diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a73a934b6..e0cb10d7d 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: 38254260-287a-40b6-9ac5-c2fcb654c9cc management: - docChecksum: 8eb7746fd60545ccbdd89ac13589745a - docVersion: 10.32.0 - speakeasyVersion: 1.791.4 - generationVersion: 2.926.8 - releaseVersion: 0.37.0 - configChecksum: cfb22a38430ff0268122c4a321d0a6fc + docChecksum: 574c4bc986232d76f17e5d659eb112d2 + docVersion: 10.42.0 + speakeasyVersion: 1.795.0 + generationVersion: 2.931.0 + releaseVersion: 0.38.0 + configChecksum: bb901aea205615f992b2ec41ea3c52d3 repoURL: https://github.com/apideck-libraries/sdk-java.git installationURL: https://github.com/apideck-libraries/sdk-java published: true persistentEdits: - generation_id: cc761093-6d5d-4514-aa53-524a7ec50044 - pristine_commit_hash: cd4e1f3dbd64fd891ecc8d0cda5766a838e32625 - pristine_tree_hash: e6c0f5e79071bcb7fb66348eac6bc3bf368fbe73 + generation_id: 7e3cc5c8-751a-48ba-a7f2-732e1f5c7ee1 + pristine_commit_hash: 35bde60a609a657639f0aeefaeb5b085027f81eb + pristine_tree_hash: 6b1fc1026478f67fd745a372ee1663cbe390311a features: java: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 additionalProperties: 0.0.2 constsAndDefaults: 0.1.3 - core: 3.56.1 + core: 3.57.0 deprecations: 2.81.2 downloadStreams: 0.1.1 errors: 1.0.2 @@ -40,7 +40,7 @@ features: retries: 0.1.3 sdkHooks: 1.2.0 typeOverrides: 2.81.1 - unions: 0.3.6 + unions: 0.3.8 uploadStreams: 0.1.0 trackedFiles: .gitattributes: @@ -131,6 +131,22 @@ trackedFiles: id: 82320c53981e last_write_checksum: sha1:910e78f7d4619365efae3f80e62f9532dda5e463 pristine_git_object: 4ef506b5d72c357766025c0fcc3dd17a56fe0f3e + docs/models/components/AccountingPaymentMethod.md: + id: f8240f5cd8a0 + last_write_checksum: sha1:63bb7d6e1c6bd93eb6a2ae15d0891db71e4fce15 + pristine_git_object: 12b3136c942d8b7bc527d11a56ee6d8d151a83d1 + docs/models/components/AccountingPaymentMethodInput.md: + id: 744c466ec5a5 + last_write_checksum: sha1:41f38da416345a42391260405fb728331fc89501 + pristine_git_object: 7f9a3dd3865d0cdbd098e0e88b0c98bfbc10660c + docs/models/components/AccountingPaymentMethodStatus.md: + id: 73d4ac56956c + last_write_checksum: sha1:2397966666e167207cc88bdf1c6d5f28a5edf5cf + pristine_git_object: e924caf5d21dd357147ad00b9a9b82342c58877c + docs/models/components/AccountingPaymentMethodType.md: + id: 028901ee2c6d + last_write_checksum: sha1:17d4cee9fa5ebf174d44f92be908e872d5fb0964 + pristine_git_object: 697eaec2aab4b64e4bf2556f29aea2647e30f245 docs/models/components/AccountingPeriod.md: id: 48f9562d3c67 last_write_checksum: sha1:4e08ecef84784a27acd68edab04744dd3a292ce6 @@ -285,8 +301,8 @@ trackedFiles: pristine_git_object: 17c7f74a2a98edf21720de69d74d0b190bb1217d docs/models/components/Attachment.md: id: 1176ea70873d - last_write_checksum: sha1:2ea1c8c10fade5235ab303de3502bd264d3ce03e - pristine_git_object: a59dabe55c3fb44a84c9d243adb186f5c9670f8d + last_write_checksum: sha1:93bcb6e995238aedfda77ae4b2dd6d46ba94c3c8 + pristine_git_object: 3d17b9b5ac363d52da4277624c4afd997915eca7 docs/models/components/AttachmentReference.md: id: 161b87923f17 last_write_checksum: sha1:b94ea5c2402321f699f64b5e22849003439f2b01 @@ -393,12 +409,12 @@ trackedFiles: pristine_git_object: 4af388096a349170eaa71c88a332a333051ff88a docs/models/components/BankFeedAccount.md: id: ab3238e6c07b - last_write_checksum: sha1:143dbb711eb90495932d10ec162bd31728966ff2 - pristine_git_object: c29b1c37bc1850c71380164ab16a2d6fd6d5fc9f + last_write_checksum: sha1:c17f84d6016c2092d0759a11d3b348ef9ac1a729 + pristine_git_object: 5a5d08d5b8282a3624be4b07f82f24e485e24fbf docs/models/components/BankFeedAccountInput.md: id: 57ed57179c1d - last_write_checksum: sha1:e7bc8ec68a60e76e1870fa74f407cb34faa2187d - pristine_git_object: 079c7eafcd7a9e3de91eccad71891365ed427c03 + last_write_checksum: sha1:77b96152912a559a0bc4e7edfbbd18f10df35d15 + pristine_git_object: 77fa87ea429af05709057becd15f0b7f13ec907a docs/models/components/BankFeedStatement.md: id: 736298bc25ae last_write_checksum: sha1:3e7cae40d409986d09781e69a5da06e8eeb4bdff @@ -943,6 +959,10 @@ trackedFiles: id: f8b0ad463cf4 last_write_checksum: sha1:b90549f971653b9146d66830cb6aea17956b62f4 pristine_git_object: 7062676184c8b642d63acce7c852f6a06f505d8b + docs/models/components/CreatePaymentMethodResponse.md: + id: 765332b51d07 + last_write_checksum: sha1:2b897dc8270967316814c1caf005f4975327a441 + pristine_git_object: 53df4f15ad6e07aeaa5f00ad2812b059ee667a52 docs/models/components/CreatePaymentResponse.md: id: 8c0f3713470e last_write_checksum: sha1:d63a32d8fb43f927e1b4b8cd81dbc777e790b3c1 @@ -967,6 +987,10 @@ trackedFiles: id: 4cb10ecf4532 last_write_checksum: sha1:70eb615ca8d7db50b7d73a7076383d15c716a8a5 pristine_git_object: dae10625ae1ca67772ed7b9be888f160e1042536 + docs/models/components/CreateSalesReceiptResponse.md: + id: 538585e69870 + last_write_checksum: sha1:95a92e8778d76969378081dbb256aed3140be401 + pristine_git_object: 9d2203db12f6f1fec180389cbc4a915771bb7ef5 docs/models/components/CreateSessionResponse.md: id: 79ad6482fffe last_write_checksum: sha1:23d1293a8b00452403b01af7c10cdaf07be11e64 @@ -1073,16 +1097,16 @@ trackedFiles: pristine_git_object: 77a61f810b5354eedd0e21511f8f07d7ec1c5fef docs/models/components/CustomField1.md: id: 56278478d6ee - last_write_checksum: sha1:c161cd401a5601ae83199b4e89c8a90cf0428407 - pristine_git_object: 8d170144e357d7750a992cae8f97d5ca82b20f2b + last_write_checksum: sha1:b64ee6796b7bf4e6103e9edeaf2a55145bed6e1e + pristine_git_object: 7b2ccced75c1f9ad99732b9685cf48ae130e8874 docs/models/components/CustomField1Value.md: id: 2a7fedb1426f last_write_checksum: sha1:9110345329fe074609eb4d9b7376624528dd327d pristine_git_object: 3e67efd7c6abe3c9d2362f8e0e211e76eb74ff03 docs/models/components/CustomField2.md: id: 4e6b29fed7e7 - last_write_checksum: sha1:efe5d7a55db5e8d1d4960daaaaf192c8ed0c93fa - pristine_git_object: 152af01e61d25bbc56971999b6eb255dee86ebbc + last_write_checksum: sha1:9910edec2ccfcddfcf93d8ca083244e5d9aebd3a + pristine_git_object: 6120c043bf223ce4b7b3630e985e22fd6b50d798 docs/models/components/CustomFieldFinder.md: id: ba0bd225959e last_write_checksum: sha1:30e3c783efc46a52847db3bf0dff411accb161b0 @@ -1355,6 +1379,10 @@ trackedFiles: id: c3e919b832dc last_write_checksum: sha1:a0f68c4a54801482c3785139a4fb03ef90cefdec pristine_git_object: 9ae99cfa29591da8f1e8005e3be02bda0da32beb + docs/models/components/DeletePaymentMethodResponse.md: + id: 3e0374a442b4 + last_write_checksum: sha1:b7a3d88e7c31d585391125e14e68ccd2e5ba9f5a + pristine_git_object: 81548eedf5c30c39b8452469779d1a06ccdf6dc6 docs/models/components/DeletePaymentResponse.md: id: fb6c8ca1f302 last_write_checksum: sha1:61148d2d3cedf364b08516599bf19add3ce0fd17 @@ -1379,6 +1407,10 @@ trackedFiles: id: 5f2a5491d9f5 last_write_checksum: sha1:83e0a467e535d4a5270db9675cce6b34a973873c pristine_git_object: 34018afce647e9510eb9f20c0665a0fc250cce79 + docs/models/components/DeleteSalesReceiptResponse.md: + id: 5bf33599e483 + last_write_checksum: sha1:672226584fbc4dd7bfa9755d5b52e13a29cf2261 + pristine_git_object: 999a9ce06f723690bb759f3b35ecb06a415c974e docs/models/components/DeleteSharedLinkResponse.md: id: 42cbf7f777a9 last_write_checksum: sha1:f08b360217cd223568daecaa52c838d2e1b945b8 @@ -2319,6 +2351,14 @@ trackedFiles: id: 51477f0fb1c4 last_write_checksum: sha1:0d29d12fe5da2729ca0b0486644813818d57b1eb pristine_git_object: 7815e1f84d0bad9e4295a8144743fadf4ad5f963 + docs/models/components/GetPaymentMethodResponse.md: + id: ad94de545b78 + last_write_checksum: sha1:bda2c45b094fc712bf776e8cd4165830be879565 + pristine_git_object: 78d54d534748d0c5cc4c2c56452f93fa8aea0dcf + docs/models/components/GetPaymentMethodsResponse.md: + id: f9a36f5a16c3 + last_write_checksum: sha1:7cb3e12a65ea871296a19c48ee94fca80c0b8306 + pristine_git_object: e4bf269befe2295dee22bdbfc8224bbb04f9866e docs/models/components/GetPaymentResponse.md: id: "964913591501" last_write_checksum: sha1:3358359a20d70d1d3b98598a0a3fe5efa4a89c0f @@ -2387,6 +2427,14 @@ trackedFiles: id: ba196ecbd20b last_write_checksum: sha1:6a2335456659c0857af9491be39fa1bfa70b5b7b pristine_git_object: 3479e7670ffd2fc4423790aaef36a94f1009c08c + docs/models/components/GetSalesReceiptResponse.md: + id: bddd8cfff6f2 + last_write_checksum: sha1:ac643e6c2364a6632d6fad8738ff3cddd222adcc + pristine_git_object: e023f1201fb6e3385778b9b2e9f0106b032c97e5 + docs/models/components/GetSalesReceiptsResponse.md: + id: 5dc7177ee11d + last_write_checksum: sha1:95d9b958cc4c5bdb9727b8293769acfa617543d5 + pristine_git_object: 054765f8265a00783e8f4ee6efa5e1df8dbd65dc docs/models/components/GetSharedLinkResponse.md: id: 33a43d415f9d last_write_checksum: sha1:67229fc2cb6db9c9d5b777a79e49b32d931fb6ee @@ -3285,20 +3333,20 @@ trackedFiles: pristine_git_object: b2310af94bac8785a4664db805984554aa9280d2 docs/models/components/Refund.md: id: a2190313768a - last_write_checksum: sha1:86f49c6b142c61b48ea6415c00bd2208dc7e7371 - pristine_git_object: 486e848279f39d6f123a6649a2ce14e0edd7e296 + last_write_checksum: sha1:78a83d4872dc1d27152a02c22cec134baa36d616 + pristine_git_object: 840e44d3d195cb28af3283d6c5f3f03fd4fa2789 docs/models/components/RefundInput.md: id: 00ffecd95e2f - last_write_checksum: sha1:22fb241230c2ba904475133b2350d71195b88ced - pristine_git_object: 836e4db22128914fc2cb425e51465bb277e0ad0a + last_write_checksum: sha1:02b3a7bcbbf6821bcfc0974750f26c30864c9e03 + pristine_git_object: 4ec766564db7b4f703a7c58ef534bf9b3faf2a6c docs/models/components/RefundStatus.md: id: 77cdfb79bfbb last_write_checksum: sha1:efaed501468d798fe36a5459b639f2af3bbd2b9b pristine_git_object: dbede9d80a4337dbf17f1a9153322f6093ac13c3 docs/models/components/RefundType.md: id: d7b997c55c6e - last_write_checksum: sha1:793156a96b9dda7d65ec25928d1fdc0e2d539b5e - pristine_git_object: 46aea90aa015dd87376d38db23278db6956f7c70 + last_write_checksum: sha1:3cb852accad6dd4fa1726decc002818869a448bf + pristine_git_object: 2a61dd345e54a942ec6cc8fde3f60d4a341ca001 docs/models/components/RefundsFilter.md: id: 4768fbe80bcb last_write_checksum: sha1:9d382386ed0350247363a7194530e8e12265677f @@ -3347,6 +3395,26 @@ trackedFiles: id: 70568133ae3b last_write_checksum: sha1:4c6117e5075c501050ca513c948e7c16b247c078 pristine_git_object: 052355f9ad8eb0afa5f79bfdd163b67450855554 + docs/models/components/SalesReceipt.md: + id: 3f7291c2eb9e + last_write_checksum: sha1:3dc406e02ebbc6f15663061be3e10caafdcce496 + pristine_git_object: e79729489fc447192836ce79a4e5b4707ccbc448 + docs/models/components/SalesReceiptInput.md: + id: 289993fd2c41 + last_write_checksum: sha1:29907a5f05d7575080551fa0471d4c95ac7ce131 + pristine_git_object: d6f86003c3eb1f8b75ffc6aea9727d949efb27b9 + docs/models/components/SalesReceiptsFilter.md: + id: 8940ebe46960 + last_write_checksum: sha1:bdb0647be5dae94cf0ba41aaaeb4180bc7a2cec3 + pristine_git_object: 114ffa8749a0a0a32884489252740481921a4643 + docs/models/components/SalesReceiptsSort.md: + id: 7dedcc2a1661 + last_write_checksum: sha1:8abdb370a41d386f13e04eafe1d7aeaebbf2f0f3 + pristine_git_object: 0ef099b292c4418a1edab93109dc1f616ed86530 + docs/models/components/SalesReceiptsSortBy.md: + id: e118beb8bc35 + last_write_checksum: sha1:a31cdb0d1ace974092c6723ae00e301a35331266 + pristine_git_object: 5553eba79aa96fa566e82b78765a39fd357668f8 docs/models/components/Schedule.md: id: d0dca3c02629 last_write_checksum: sha1:6fc58cbfdeee5f338d48d71fc3fe4e72acb745a0 @@ -3621,8 +3689,8 @@ trackedFiles: pristine_git_object: 15ca7e3ff13d4751dba5f675eb35da72d15fb6ec docs/models/components/Transactions.md: id: d30574ce9507 - last_write_checksum: sha1:d800a7995d35a22ca7b7f2f81e712e9b2f5a786e - pristine_git_object: a08490cabf727c0d72afce50c886fdc48ebdb5fa + last_write_checksum: sha1:6ebfaa16dcc53a072dca1bb2ec6a2a64167c5d36 + pristine_git_object: 93c86ba4ca82c94c335a8f2dbf2c33d08f614946 docs/models/components/Two.md: id: d40a2aa6dcb3 last_write_checksum: sha1:0f2dca53ddd76336e0767fee7c4448ba84cd54c3 @@ -3847,6 +3915,10 @@ trackedFiles: id: 269a9279bfdb last_write_checksum: sha1:101cc3bab09918d3c273aa23ff163cf70c683562 pristine_git_object: c2f053944cacebb5cfc151ead1a7a8657d17ac9c + docs/models/components/UpdatePaymentMethodResponse.md: + id: 686d4bfd860b + last_write_checksum: sha1:c13b853b179b01b541c9e5424a14cd80227ae992 + pristine_git_object: 775d6fb392b471aef6d98befe4807b1d3028fb3a docs/models/components/UpdatePaymentResponse.md: id: 7fb29e283c62 last_write_checksum: sha1:55a2fc2ddd0164a7f06b6526603fd990e93b6a9d @@ -3871,6 +3943,10 @@ trackedFiles: id: 9d048dbcb221 last_write_checksum: sha1:522a157738a0447432d522361f6f4267effc2acb pristine_git_object: 34f9f762aba6be9fafc7bdcc1a50a2186e0a7505 + docs/models/components/UpdateSalesReceiptResponse.md: + id: 912771fb4d77 + last_write_checksum: sha1:58bb1fa572e27d430be6eb3f476cb3ce1ccace99 + pristine_git_object: aa4b76cff59485896e2eaf265a2d2c0df5ef17b9 docs/models/components/UpdateSharedLinkResponse.md: id: 87a3042bce67 last_write_checksum: sha1:607face4ad791d24f322e2076b32ffd8e8d25c1a @@ -4121,12 +4197,12 @@ trackedFiles: pristine_git_object: 414fed48361ddc91b92ca66c6476d97b0966d8bb docs/models/operations/AccountingAttachmentsDownloadRequest.md: id: 5486eaa73400 - last_write_checksum: sha1:e416982a99ffd43ce1187c6bbe2c0e9b6be59d71 - pristine_git_object: 6b7fb6016df336e36bec216111fa5cc0066dc2ed + last_write_checksum: sha1:ca3487d61434d36a044195efa94043997b5b745e + pristine_git_object: 83c8a7a2f32ed359185ce940232c025949e28973 docs/models/operations/AccountingAttachmentsDownloadResponse.md: id: 557f8660d0da - last_write_checksum: sha1:b9636b8c741653f19b3ae38a96c3190a2bf3e881 - pristine_git_object: 3a431e3c2e96e683be013b3fcecf00bcf3e956d6 + last_write_checksum: sha1:27795eee6c426a24d8ceffddc1419ae3ced8f447 + pristine_git_object: ed64b29e777b9e2d9746101b707764e3fcd92650 docs/models/operations/AccountingAttachmentsOneRequest.md: id: 89ad2cb06ca4 last_write_checksum: sha1:c766c66be3177cff8f3cf6aeca08e1154220d7f6 @@ -4879,6 +4955,46 @@ trackedFiles: id: c5d3de00dec6 last_write_checksum: sha1:f3d6baaf3cf97e27ed08da08a6d83425411a9da3 pristine_git_object: 36decedbe4d733c60cad322ab4b02ca3fb5583d4 + docs/models/operations/AccountingPaymentMethodsAddRequest.md: + id: 59afef3dba4b + last_write_checksum: sha1:30f09d15eb6568409153f5761316cd42cdadb95f + pristine_git_object: 2f82b2ca10ad66dfd66af64c55f142f8b96a84e4 + docs/models/operations/AccountingPaymentMethodsAddResponse.md: + id: c79b121c0e3a + last_write_checksum: sha1:7a82c4a87108625541e041057fafed91b9b1da8d + pristine_git_object: b468d938c36992e2bbfa986faa4cf134c5699170 + docs/models/operations/AccountingPaymentMethodsAllRequest.md: + id: acebd4a55b9d + last_write_checksum: sha1:fabe4e3af922e09c3e650a4fef0b2a8ba73b1974 + pristine_git_object: c743e6692ff9d1a08a6aa819dc69111c0bb55e16 + docs/models/operations/AccountingPaymentMethodsAllResponse.md: + id: 18db568ba19b + last_write_checksum: sha1:b69db1524f31f36588f30603f06f67a5ea3909a0 + pristine_git_object: de23b8f5c67f856a308a73bea773972717a8c16c + docs/models/operations/AccountingPaymentMethodsDeleteRequest.md: + id: 5e503b06a88d + last_write_checksum: sha1:e6973da630d34fdd870bb313d0c250a150251f91 + pristine_git_object: cf2a5df82a322242eb6d7db1ee95fce64e4669ab + docs/models/operations/AccountingPaymentMethodsDeleteResponse.md: + id: fb118882c38f + last_write_checksum: sha1:cd9714959c1b0bf4f80bc7c7f2949b5e43772f5e + pristine_git_object: 8c25a633ce87c462974e2069bcd7638a8320db81 + docs/models/operations/AccountingPaymentMethodsOneRequest.md: + id: 7e88a059a344 + last_write_checksum: sha1:2de7a11e4811b6a04015df7ad068585c4c6c43e4 + pristine_git_object: 3e130d809db8b11e8ff83bc5dfdee9d5334eb2b0 + docs/models/operations/AccountingPaymentMethodsOneResponse.md: + id: bac3d8050c77 + last_write_checksum: sha1:cef098591993fea11e57fe4f0c2efc8fc96f8dc7 + pristine_git_object: 4fae5be6b79985c3a42da669ccb323808af41509 + docs/models/operations/AccountingPaymentMethodsUpdateRequest.md: + id: c349a895f3ea + last_write_checksum: sha1:ba23f4da76d2f00fca5f75c0a0d4908a341e556e + pristine_git_object: 96466274f89c27e518270850a997bf51869f3e07 + docs/models/operations/AccountingPaymentMethodsUpdateResponse.md: + id: 680d9af33ca1 + last_write_checksum: sha1:a70617678356152435c97427ea390049f8943705 + pristine_git_object: 766467ab5c407eeb4eb46522f0d70aba76b4baa8 docs/models/operations/AccountingPaymentsAddRequest.md: id: 6b10b87d5f66 last_write_checksum: sha1:d25fe54d5b5fccf6aafe24ec65d600167455e8d6 @@ -5087,6 +5203,46 @@ trackedFiles: id: c5584828abcf last_write_checksum: sha1:8a7fc616837e8be4fb614bee03c724404de765b0 pristine_git_object: 9d2095456186fdd01392e09455845dd187a9ffdd + docs/models/operations/AccountingSalesReceiptsAddRequest.md: + id: 860ad9fbe9da + last_write_checksum: sha1:1c673b75e20fa55efd519eac41a4d63ab00525e1 + pristine_git_object: a8bd66d1d692f3d8f48079f2f9b5f09aacdd824b + docs/models/operations/AccountingSalesReceiptsAddResponse.md: + id: 4b7913d7ccb7 + last_write_checksum: sha1:4137eb09faf82621d6b7618619ec3beab1095772 + pristine_git_object: f121b5848df103825d60b4a1bdaae34bbb056e65 + docs/models/operations/AccountingSalesReceiptsAllRequest.md: + id: 2b8313d16294 + last_write_checksum: sha1:337c80e0209ac5e6218cc0cb2231cfd306f4ab2c + pristine_git_object: 0899353d64d71adaf442fc5c2c99a1dea36081ab + docs/models/operations/AccountingSalesReceiptsAllResponse.md: + id: f64dc2cdf0ea + last_write_checksum: sha1:80618da2edca181bbaac449eedad1fa80adfdbd9 + pristine_git_object: 45b9de259a530eb44d20d51d4b2e31ca9800de0e + docs/models/operations/AccountingSalesReceiptsDeleteRequest.md: + id: 2d05d283ba1b + last_write_checksum: sha1:abae9cdbd396ca326d329df5ee539fda30a1116c + pristine_git_object: 30fb82abd47968ac41fff42ffc23c43097e2e9a1 + docs/models/operations/AccountingSalesReceiptsDeleteResponse.md: + id: cea1d7fe10c5 + last_write_checksum: sha1:27b3739c08849af4effd37fe843768309d6beeb9 + pristine_git_object: 770f283c1359313f0ac6dba4c852f2884150a2c3 + docs/models/operations/AccountingSalesReceiptsOneRequest.md: + id: 7a3d526abfde + last_write_checksum: sha1:27a5977ee698887b940755ef35f2f1953fb6d679 + pristine_git_object: acd498692820f4b1cb15e7a9ecb79c19d37d5c3e + docs/models/operations/AccountingSalesReceiptsOneResponse.md: + id: bcd8d5b6ca91 + last_write_checksum: sha1:21ae2267958b351b9a20b6dd39c7cdd02b021df6 + pristine_git_object: ca060c4d9ab65dbdb144dc589e16f08f798b08c7 + docs/models/operations/AccountingSalesReceiptsUpdateRequest.md: + id: 375994fad920 + last_write_checksum: sha1:1404400d72e7ccb0bf0dc5af6191726bfc08ddef + pristine_git_object: d665b34ed85d110447b97a0a5c98912a38fe4dbb + docs/models/operations/AccountingSalesReceiptsUpdateResponse.md: + id: 1fd8262bf739 + last_write_checksum: sha1:14bebc59c4f003832814caeebd252f4848161b04 + pristine_git_object: 4d0e3bcc733a1122f04095a73848f80aba5534e8 docs/models/operations/AccountingSubsidiariesAddRequest.md: id: 0cf343fe9773 last_write_checksum: sha1:bf4463aba6242d1999e406a46b75af7573ccf4f1 @@ -6009,20 +6165,20 @@ trackedFiles: pristine_git_object: 061ac00f9d4cb0be86f8b85453d438e2dd0d25ef docs/models/operations/FileStorageFilesDownloadRequest.md: id: 21df6fafd64d - last_write_checksum: sha1:96e2b1c053fed710890f39e24b1ae1e644a1091d - pristine_git_object: 3798bc2e90384ddfbbd9bf3f4847dc9fe0e2de35 + last_write_checksum: sha1:7ba84a42bdd823df0fc53a770db742af8d98a220 + pristine_git_object: 5b59926c569f7b3125739553e9450226e300ce70 docs/models/operations/FileStorageFilesDownloadResponse.md: id: c5f5ba71994e - last_write_checksum: sha1:b9c0adb00e565f7356c258f62439a71234e2c308 - pristine_git_object: c3ce5aa3a36f3bed799961d8c55c740efc30ec72 + last_write_checksum: sha1:9a37733d81c215efc68473c7c274252e6819ce7d + pristine_git_object: 8590c2ad3f1fd14cc1e6a9d61b5f1c8045ee0f6e docs/models/operations/FileStorageFilesExportRequest.md: id: feb6e6d02549 last_write_checksum: sha1:31e35de6068c76bf3177bc5cf4da5ddb2ec13781 pristine_git_object: 301bff7e657c59be10db87f69e92adffbdd4344c docs/models/operations/FileStorageFilesExportResponse.md: id: b67a27ee647b - last_write_checksum: sha1:c138942278c65c7c876f838fa25d882453cc8e7a - pristine_git_object: 7566f849100c2e83c98285db951134db877c4d86 + last_write_checksum: sha1:075b2e0642d19a7a8071e66eab004ea53f37efa0 + pristine_git_object: e317277ca1d36a53fed1847c80b79dbd0d02c6c7 docs/models/operations/FileStorageFilesOneRequest.md: id: 99608db7c5d1 last_write_checksum: sha1:5d8e89614b7bfef83998e60f1b01b6a9d9613d83 @@ -6497,32 +6653,32 @@ trackedFiles: pristine_git_object: 223341fdaca4eae847df22c9cc9448f9756462b3 docs/models/operations/ProxyDeleteProxyRequest.md: id: cc85f0ef3185 - last_write_checksum: sha1:11598d029d86a39ad4ebb82f35e77c887bc00133 - pristine_git_object: 4f76e1b3fcd960f3dc5a8747e4914e676f6a943f + last_write_checksum: sha1:3377048bfb61806319eb696b712df854d7005807 + pristine_git_object: 05dc3d7124a3eedf94cab23d233c90401a3c301a docs/models/operations/ProxyDeleteProxyResponse.md: id: 43430e265ee0 - last_write_checksum: sha1:bbccc5fb704f902b87fbd2256ad54bc688e74e6d - pristine_git_object: 4e7404661b067b64982e18f07b95211d5ac8a105 + last_write_checksum: sha1:283eab8e392681b8ac0212e55ef6019e583b1e6c + pristine_git_object: 4b51baf98ac52637a2bb64277cbcf8438ee9b613 docs/models/operations/ProxyGetProxyRequest.md: id: 73cc4a9785ba - last_write_checksum: sha1:ebc4a81d2086bac964cd08c659ba9974c58cd263 - pristine_git_object: 1ed805b620d7560042a7ae5f4fe0976fce5f9f81 + last_write_checksum: sha1:688855d65d5f305c36a8331b25302637cdb2b7c5 + pristine_git_object: 380e268a1e968a2ce8e33e247af2dcb40cdf34c9 docs/models/operations/ProxyGetProxyResponse.md: id: c9444f80ebdf - last_write_checksum: sha1:7aa5b57e5f2969b989e80fbc83143d9a6ea23abd - pristine_git_object: 0e82fb8494bc2df7150df799641bbbb402d3aa18 + last_write_checksum: sha1:d8bf7f39d0bd811ccec83f57e1300651983eaeaa + pristine_git_object: d9fb9e8e742d04bb21a1a95c8628c7802affc28b docs/models/operations/ProxyOptionsProxyRequest.md: id: 92b1ffbf2706 - last_write_checksum: sha1:b8f35e8b1769c0de87b7e7fddfa0236cc032d6df - pristine_git_object: 949ed951a110eac5222a903f4bef6853bcf6c760 + last_write_checksum: sha1:a2736c6d2f4da36cca63a534d37633d72d7d4a42 + pristine_git_object: de1dfea230d198bb65fd8834daa84ebd388e4856 docs/models/operations/ProxyOptionsProxyResponse.md: id: e4ad496f26ca - last_write_checksum: sha1:2cbe2e423bcce4c9ef5c9aacd5a8d551201cd9e7 - pristine_git_object: cf01fd066ce3c28c1b694da55760529ac353236b + last_write_checksum: sha1:03740948474b0ace68f90c6b286da87cbcdf2007 + pristine_git_object: f28aba7847b4a035bd8edfb33551bfdfd3fdef86 docs/models/operations/ProxyPatchProxyRequest.md: id: 8a568e004fc1 - last_write_checksum: sha1:c71494c5838b43c39cc32cd2282afde7e9b02b4d - pristine_git_object: 7f87205dcce5efd7326bba3fbaf5fd362a90e990 + last_write_checksum: sha1:d02966188f7e57206acc66d4d4113f54f04e9823 + pristine_git_object: 1d2a9b4e7116c082f209a1237d7aed77ad1869a1 docs/models/operations/ProxyPatchProxyRequestBody1.md: id: b1307700686a last_write_checksum: sha1:e7e8bbb12c000abebef2594ac8da50e8a7f74560 @@ -6533,24 +6689,24 @@ trackedFiles: pristine_git_object: 8378f5fca87fb01b61609a0c7fca44bde6acdd4e docs/models/operations/ProxyPatchProxyResponse.md: id: 8796eeea49ca - last_write_checksum: sha1:fbb92d3eb9d8a2348eb9c64f60228bc096d9d93f - pristine_git_object: 6fd742702ad0c75584220261cae6159408291d0f + last_write_checksum: sha1:c5c22bdf812018a18465beef01c377e5a18ce474 + pristine_git_object: 1afa6ec7e7942116c25f6f5d02568357498bcf85 docs/models/operations/ProxyPostProxyRequest.md: id: d3384479aa69 - last_write_checksum: sha1:0d7b49a0eef1f06f24179a5972cda3b98c5584e0 - pristine_git_object: 1ffc9b0c8fb6fefd07131dd154567b5e28859ee7 + last_write_checksum: sha1:730e0d78223056cce2ff277a0e05fd5b06af44fd + pristine_git_object: d144b1ab396bca3905e3509156c30a5730319fc7 docs/models/operations/ProxyPostProxyResponse.md: id: 217617edf934 - last_write_checksum: sha1:0fa7825f4dceae792452ef18d0610ab921c6fc81 - pristine_git_object: e83aa50d6f3a4fd7298ffb0849b1bfafa41a1528 + last_write_checksum: sha1:cfc12d39005ff9b3d6c8fe581909ce5e0280093f + pristine_git_object: 2a71f2566a7fa591b0abf0eab408aa382afef86a docs/models/operations/ProxyPutProxyRequest.md: id: 690f3f23b961 - last_write_checksum: sha1:5c3d373199ad2d252e3459706a39c877e3129182 - pristine_git_object: d25a0c0b90760ecc298654bb2e91f52f84eafc3c + last_write_checksum: sha1:fe06b4e4638cc9417d7840009006346ca5ebc537 + pristine_git_object: 7bbfab9dfe2ac2a5a7408b28493dd1647a8e3d82 docs/models/operations/ProxyPutProxyResponse.md: id: 5414f16ce155 - last_write_checksum: sha1:744d2ebc26d03fe0f5e147b1fd31513ccaf43ccf - pristine_git_object: 53e6bf406d4e825e3da338bd554df5c7a909f1be + last_write_checksum: sha1:ca09e0ac6492bc6e40f8939c39d6b501cab02b55 + pristine_git_object: 4982f082ec3fded18f51474537a7e519703f87e4 docs/models/operations/RequestBody1.md: id: 965f5c2cfb6f last_write_checksum: sha1:439fc916e85d97e47ece746cf2ae73d16023c204 @@ -6897,8 +7053,8 @@ trackedFiles: pristine_git_object: ddecf940049de02ad1a3a8f5c3b06ecf47eae516 docs/sdks/attachments/README.md: id: b60e6ecf628b - last_write_checksum: sha1:5fbd5a6fa9fac57e00f0ed495fb0e438e0a97182 - pristine_git_object: 27c5b8fb7c55897ef60a4f525bcb115a676fc51f + last_write_checksum: sha1:0d19f05d88e9c4be90dbc79732b8005dc19bfdd2 + pristine_git_object: 793a2b109cdd56e3f6da233b1ce9acb316dea5cd docs/sdks/balancesheet/README.md: id: b360644f6413 last_write_checksum: sha1:1e1bb7035d87aab5e3dca2544ddaff1e195e02c7 @@ -7065,8 +7221,8 @@ trackedFiles: pristine_git_object: d8d6d6242f19484907affb294c6e3f848bbe0393 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:3b1236a018f9dd8506777110c5dfd4e9c5337a64 - pristine_git_object: 035f78d7e9977446759bd387798023a352f01b31 + last_write_checksum: sha1:b3ee2762037d3a9d446eeb6f20af90b62f924c8e + pristine_git_object: e76336a8d429de0c86b6171e3e4082ddd1a63973 docs/sdks/folders/README.md: id: ffb38e069dec last_write_checksum: sha1:0ca2c187b0704b7dea9258867f7623c6ecc08139 @@ -7131,6 +7287,10 @@ trackedFiles: id: fc5b2caf3cb2 last_write_checksum: sha1:4477653d18dc500f858dd31ed4460b290ec6715f pristine_git_object: 5b6fcc11d16bc0a13bb9bea3132c9893181d81d4 + docs/sdks/paymentmethods/README.md: + id: 98b2df26035c + last_write_checksum: sha1:c8550073a3377501e95377a8916ef34ba8c7cbf6 + pristine_git_object: 29c0580e57e521b13c64d3ceb9c6b2949da2e05a docs/sdks/payments/README.md: id: 0ddb15ec8c20 last_write_checksum: sha1:dd2135885ae132bb3b1ef2b6da794614d31ba591 @@ -7157,8 +7317,8 @@ trackedFiles: pristine_git_object: 109cc0024fa68a3b4029d495ddcebb2c008bba3b docs/sdks/proxy/README.md: id: 2c72b780f1d0 - last_write_checksum: sha1:db15bf992e08ff8d72c4d2dfac8d4bbec494d476 - pristine_git_object: bbfb2d6e77c547197962a05fec02ba8f4f71ee3d + last_write_checksum: sha1:a4bdcd06b79a05abc9d0bc14dd6fb859eb77bf2d + pristine_git_object: c050df0f3c052816d6b4357564da279d3b21a0b7 docs/sdks/purchaseorders/README.md: id: bdb6c1926bcc last_write_checksum: sha1:11762f911597a1891d389f6f008590ea6610194c @@ -7171,6 +7331,10 @@ trackedFiles: id: 451a9838a921 last_write_checksum: sha1:bfe8f713fd4064a83405fbb98bb04c45e0d1216e pristine_git_object: 48afac54af55f78a6d798d37b7a909f91732e3b2 + docs/sdks/salesreceipts/README.md: + id: 70fd847a91a7 + last_write_checksum: sha1:2f72f097a970615b6ee9c6c609f1d6f398e4f952 + pristine_git_object: ea184c2f3c866822619529fe0b8b5ea45586ce66 docs/sdks/sessions/README.md: id: 57ad62844f79 last_write_checksum: sha1:be24445eedf56ddab29506ce11693e9a0c436c0c @@ -7225,8 +7389,8 @@ trackedFiles: pristine_git_object: c755c6aa377f358344e761e9cc3e7b67bc1fb479 gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:552d5ef06b039fd0d21f0f7a3dc02c752db89b68 - pristine_git_object: bc239dad0b62601e9d7e1421b7800ace33e6d46f + last_write_checksum: sha1:3ec8c64b9b23d2f4552b82bcb1e8ac0461b601d2 + pristine_git_object: 5f05a93d85e5524180e571b38db543b81830ad17 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -7253,8 +7417,8 @@ trackedFiles: pristine_git_object: c0c8392a8bfa6afd4d6ea570f546fe04a1ef4a91 src/main/java/com/apideck/unify/Accounting.java: id: a26e2542bb82 - last_write_checksum: sha1:524e5da0cf409f27f9a71ade0c19ae13ed57420d - pristine_git_object: e866a8c31a5a529696cafcd314c8ca8ef6e82c25 + last_write_checksum: sha1:bfa168fd8b3d730e47807b77cc81f319cb12ae88 + pristine_git_object: 31409e9ba377e75377faf0b4ac26ce52e0b6d95a src/main/java/com/apideck/unify/Activities.java: id: 6620d356ac86 last_write_checksum: sha1:494b108c87669aeb2b0535c6a18c4f58c7b655cb @@ -7313,8 +7477,8 @@ trackedFiles: pristine_git_object: db25bd77eff772cdb55e346375ad00e9bd73690c src/main/java/com/apideck/unify/AsyncAccounting.java: id: 8d268d98214f - last_write_checksum: sha1:6a444d6cb1c0982310a7fa8e9580da2b37e1e901 - pristine_git_object: b0c0302d64eb40011c9bb20c5ed73324acc69b8a + last_write_checksum: sha1:bb9339d7e2bb05b6d1387be597cecb1f3648a080 + pristine_git_object: c2641b32fbd6e1d31b3f0fbb63993839417aaaf1 src/main/java/com/apideck/unify/AsyncActivities.java: id: 6e509d02b899 last_write_checksum: sha1:37dd284ae02b0f4d26a66a2f65d8c1b6c1b83a05 @@ -7635,6 +7799,10 @@ trackedFiles: id: 3c3934506afe last_write_checksum: sha1:df089916cfad3b88a472c64cc624387e893044c4 pristine_git_object: 158830cf69b3bf32b44f255c906ef98532d0dc10 + src/main/java/com/apideck/unify/AsyncPaymentMethods.java: + id: ca582a963ddd + last_write_checksum: sha1:69623205f809a4b951c057bebd23d7d0c1f886f4 + pristine_git_object: 8d1c1bc9e00680df2f914061efb40da1cc34e388 src/main/java/com/apideck/unify/AsyncPayments.java: id: f4feda0bd53f last_write_checksum: sha1:8a9d8d070269aa89a3540cdfe97862c7b6a5b7ab @@ -7675,6 +7843,10 @@ trackedFiles: id: de48544b46d0 last_write_checksum: sha1:71cc6435001c7894530b4f0f1a1842e440f62acf pristine_git_object: b78ba3a41119efcb77f199567f1a82945d17d45d + src/main/java/com/apideck/unify/AsyncSalesReceipts.java: + id: 922350ae571e + last_write_checksum: sha1:e1c524ec341782b21f51154ae734f76d08ff46a0 + pristine_git_object: da314a84dbb4042ae35d3ca8340d8961b2669259 src/main/java/com/apideck/unify/AsyncSessions.java: id: 1208bcc06187 last_write_checksum: sha1:7e608a97378964a6cf7676dfec370f15ac972d22 @@ -7999,6 +8171,10 @@ trackedFiles: id: 91959cd49081 last_write_checksum: sha1:8d3a434b7ccb1f837a1123eef321c5fc12e6f5dc pristine_git_object: 00be4a718db7a4cc6e55799f1a6c619b1a393a51 + src/main/java/com/apideck/unify/PaymentMethods.java: + id: cc61922eaf8a + last_write_checksum: sha1:1f1223fe3594f7b65e36c69b8eda86189d4ae492 + pristine_git_object: 6a3bfd3d1062066281cd7a7d9419edbe7a059a51 src/main/java/com/apideck/unify/Payments.java: id: 85b5f811d7b9 last_write_checksum: sha1:0ef73fcee5b55965d299163522f80bede471b15a @@ -8041,8 +8217,12 @@ trackedFiles: pristine_git_object: 7296db7ebcdcff7ee348d1f993fc4aa2a7e6c145 src/main/java/com/apideck/unify/SDKConfiguration.java: id: a2b330a87142 - last_write_checksum: sha1:cae669188e70e9e7ae49a24ea541b75d90a28ad9 - pristine_git_object: 0fc44dc7ebd9c7b5af150be62258ebce9e15bd64 + last_write_checksum: sha1:454057a63fa22152f8d37513a95a3d85816c9d2d + pristine_git_object: 778b9e5c4fce8267cb227829ecedbc14ff92cb8e + src/main/java/com/apideck/unify/SalesReceipts.java: + id: 581d0613d982 + last_write_checksum: sha1:ff6b58483cf85dafd1f56ccfeafafbe76664342b + pristine_git_object: 70e2dc16a7ba8631dea42f020cfeb3a24bd54a38 src/main/java/com/apideck/unify/SecuritySource.java: id: e4566c6c806b last_write_checksum: sha1:101bf1a9f5cf4e8c37abb4540147276eebb2bab0 @@ -8183,6 +8363,22 @@ trackedFiles: id: d540327bd2a1 last_write_checksum: sha1:a5f22f0e60184f4c7d815c43bb1df4c5098dc29e pristine_git_object: 68e42d22e5e6d83fc330aa02812c15bfb5439277 + src/main/java/com/apideck/unify/models/components/AccountingPaymentMethod.java: + id: 931fd6f5bdeb + last_write_checksum: sha1:a9e0026b2b9081a8876a4a243074593eade8153a + pristine_git_object: 791df6fc22470abdb05fd5ac4c374d183a7d7e63 + src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodInput.java: + id: fad66aefda32 + last_write_checksum: sha1:7f989b7e93fadf7bdaf922efe6447e2c40b0a9e3 + pristine_git_object: 3ab5713aa31298995e04b10b90d422858b7582af + src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodStatus.java: + id: b830bc712de5 + last_write_checksum: sha1:6805fde2e9bf752e2f7899539c2292829c872874 + pristine_git_object: 39cec7a255195b63a6665f0631ed10c1aac2ad7b + src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodType.java: + id: 9c56b606f60c + last_write_checksum: sha1:a898db7dee503d8d308600ab2c89e5430af0dfe0 + pristine_git_object: 393f201d2cf7d0e7c6eee09f148c7c6b0e4e6f3d src/main/java/com/apideck/unify/models/components/AccountingPeriod.java: id: 42ff17c149c0 last_write_checksum: sha1:0ee4ae37b4173fd0115ee988ef9bcf6b65f4fe2a @@ -8337,8 +8533,8 @@ trackedFiles: pristine_git_object: fd18f8e6ddef476a05bc6e5d60377103cfc04b88 src/main/java/com/apideck/unify/models/components/Attachment.java: id: 2933c0010181 - last_write_checksum: sha1:0b671bc21107bd3f369ba3fc251829dbc5eeba08 - pristine_git_object: 05c52a0cbfd33f14e61cfb51bf53fcbd56201d2c + last_write_checksum: sha1:1c8b154cb76cbcfc6675fc46757fdc7c964ba208 + pristine_git_object: 3ee706636a2cd0ceff4607bfb41a930291a27087 src/main/java/com/apideck/unify/models/components/AttachmentReference.java: id: dab3520b2375 last_write_checksum: sha1:6ede21c1135ce5f6d162554ef5e5026ffaf09c6c @@ -8445,12 +8641,12 @@ trackedFiles: pristine_git_object: 20fdb1f5dbff5c0ae367bad5f82be0a5e84372bd src/main/java/com/apideck/unify/models/components/BankFeedAccount.java: id: 71e049c537f9 - last_write_checksum: sha1:f9271f1e1fd0aa7243fadbdf0f0131338dd020dc - pristine_git_object: 38819e8542fe88181bb37e9277dcb9d1f68c793f + last_write_checksum: sha1:d5e047c257f93fac86dc0822552164651da55248 + pristine_git_object: 8d5fa8d2a9294a41f9b31aaf6bf2fabb000c03f1 src/main/java/com/apideck/unify/models/components/BankFeedAccountInput.java: id: bab330a6d6e7 - last_write_checksum: sha1:4fe62c2716270be71bca8290d7c4893d0792df09 - pristine_git_object: b08aaee375479301cfd6af5a654aae76279628df + last_write_checksum: sha1:5317bfb3317e27a27a650cf7087aa8a37196f5a4 + pristine_git_object: 1712a973271c1b8723f9b1e061f34e0ec1ae7347 src/main/java/com/apideck/unify/models/components/BankFeedStatement.java: id: 86cf3854bd8c last_write_checksum: sha1:fb5fcd8fe31f07559647fc357fbf1b70da037555 @@ -8995,6 +9191,10 @@ trackedFiles: id: a99becec9fe2 last_write_checksum: sha1:6904e5c196e2ff77c3581e20f16a27ef924c6c88 pristine_git_object: 607af536d1866e63cd623b558dae64181ce9d2ab + src/main/java/com/apideck/unify/models/components/CreatePaymentMethodResponse.java: + id: 7a4e581b019f + last_write_checksum: sha1:7d54db7d14c7dd634a49729c497633188615752f + pristine_git_object: 5713eedbf65c1190e8652403962a8ef637a7c608 src/main/java/com/apideck/unify/models/components/CreatePaymentResponse.java: id: 13e3f2bdb72b last_write_checksum: sha1:06ef483d34afe93487dfd42e60d6a72f581781b0 @@ -9019,6 +9219,10 @@ trackedFiles: id: 97da8e21199c last_write_checksum: sha1:533cf9f2b72d182a48d2cf595e8033a6a5a4690e pristine_git_object: 155c6b7a071e7038d0f7d229ccf83ebc6e12f16c + src/main/java/com/apideck/unify/models/components/CreateSalesReceiptResponse.java: + id: 1c5647563e4e + last_write_checksum: sha1:125c3e6e3fe31b67e1b3889bbba0d72eff29022c + pristine_git_object: dfb2367388ac674b975dd078d1b96e316967801c src/main/java/com/apideck/unify/models/components/CreateSessionResponse.java: id: f00be1041c97 last_write_checksum: sha1:6c77db021a25c477322fbab0ff853d495c24c879 @@ -9125,16 +9329,16 @@ trackedFiles: pristine_git_object: 13b6031c80f9ba713716f68bb3e25ef1f076cc53 src/main/java/com/apideck/unify/models/components/CustomField1.java: id: 17c66ed46b1f - last_write_checksum: sha1:2dfca4135282cbb5b3af9d4f6a2f9338414ec017 - pristine_git_object: d606f1507eef0d35a7daaf41ee31d48836729c3a + last_write_checksum: sha1:f566e0e47f671aceaa0c49c1b82af269af83e613 + pristine_git_object: 10014d8a5e6d781b46b1cb62e8d04a504abdf618 src/main/java/com/apideck/unify/models/components/CustomField1Value.java: id: 85a1b8e663a1 last_write_checksum: sha1:9de4d6b883f4df10a8b0782a1898d1f3cb9885e1 pristine_git_object: 2c71af53739b75673971558aa1f42cd5cd6815b2 src/main/java/com/apideck/unify/models/components/CustomField2.java: id: ad3d52700986 - last_write_checksum: sha1:0049ce01dbdb13a4c8d3eb16e22612306dff9eb3 - pristine_git_object: e984d1abb2a612020edce51d54c2b0848698af50 + last_write_checksum: sha1:e740defe1b1fef8ec738acb40ddffbdbf2eab587 + pristine_git_object: c56b06d843e868d38005a065c860e38d932b5a79 src/main/java/com/apideck/unify/models/components/CustomFieldFinder.java: id: d602150c6c4b last_write_checksum: sha1:90ead1c98307cdd4983385607af1411a11f94b11 @@ -9407,6 +9611,10 @@ trackedFiles: id: 16c67d07d766 last_write_checksum: sha1:e1ea5488389b80b5bf55548d90163e780733df24 pristine_git_object: 45e563fefc751dae7a3186d6a5606374f0483c7e + src/main/java/com/apideck/unify/models/components/DeletePaymentMethodResponse.java: + id: 819f2ed966c1 + last_write_checksum: sha1:8c069bfb63d784d1545e6ea6e9ea95f6883efefa + pristine_git_object: b9bb8c3959971ebe61f6986cc0a37c7327d883d6 src/main/java/com/apideck/unify/models/components/DeletePaymentResponse.java: id: feaf24a9003c last_write_checksum: sha1:8401d7992ab11f7ed0d508b3884db9062781675d @@ -9431,6 +9639,10 @@ trackedFiles: id: b524fe9ffcf3 last_write_checksum: sha1:3f23c5f49316f5f66284918c3f8158e622099e63 pristine_git_object: 3efc84b0a86742bda5ee45060f59bcea3a0717bc + src/main/java/com/apideck/unify/models/components/DeleteSalesReceiptResponse.java: + id: 61d0c7cfa8e4 + last_write_checksum: sha1:012c3108795cbc8039334f46393d8ef9d1dc7a1b + pristine_git_object: 73edd921292b5547b2fbf9ff7b82fe4430ebc598 src/main/java/com/apideck/unify/models/components/DeleteSharedLinkResponse.java: id: a78eb0b1f652 last_write_checksum: sha1:d2b4ce6ec4a7adb0091b9906b3d09a1ba67e3f2c @@ -10375,6 +10587,14 @@ trackedFiles: id: d9ee5aec910d last_write_checksum: sha1:986eb8cbd5ed09083d000566ab1e8c855eeb2886 pristine_git_object: 2c3d9cd66cfa29815cc651781b320c425c2a9794 + src/main/java/com/apideck/unify/models/components/GetPaymentMethodResponse.java: + id: 224bf5d0e97e + last_write_checksum: sha1:2efa4844a464572ad7ec928f0cdaf4566769b6f0 + pristine_git_object: 4140837a3a0c675fb521b6ab4628433ff46a8164 + src/main/java/com/apideck/unify/models/components/GetPaymentMethodsResponse.java: + id: ffec03427570 + last_write_checksum: sha1:b02a5acc7fa5ab987b181530dfa96218e6d26897 + pristine_git_object: 05f219e281125a409eb44454ff209a879bebbc88 src/main/java/com/apideck/unify/models/components/GetPaymentResponse.java: id: d864bae3060f last_write_checksum: sha1:6a3b9085d9047afa2e84fc035928be0f671bf52f @@ -10443,6 +10663,14 @@ trackedFiles: id: 68df6ca27059 last_write_checksum: sha1:8278b0fe407d44b080b78b9bd6d7fd380b4d5e65 pristine_git_object: 64f075c84cac27ed014db6e198984ab244b56fa3 + src/main/java/com/apideck/unify/models/components/GetSalesReceiptResponse.java: + id: 115fbafeea67 + last_write_checksum: sha1:ec903a81a32371c2b6c528666d82af091e24a1e1 + pristine_git_object: 0fc055d352142ca65f41d9522f8cb04cbca7ee2e + src/main/java/com/apideck/unify/models/components/GetSalesReceiptsResponse.java: + id: 72d1b4eb61d6 + last_write_checksum: sha1:3b733aa1c2f8f4bfb2cfaaefca3d251e40929dfc + pristine_git_object: a6e845e0f6da49c4253b5bbd480682a70592ca01 src/main/java/com/apideck/unify/models/components/GetSharedLinkResponse.java: id: 1cbfaf2d5e6f last_write_checksum: sha1:5dead9338c524e507eb499ae39075c083f4ba299 @@ -11341,20 +11569,20 @@ trackedFiles: pristine_git_object: dfd2740f18a458191f97d2560e6a7ed513b8330e src/main/java/com/apideck/unify/models/components/Refund.java: id: 2834867789ce - last_write_checksum: sha1:f83fa5d852c4cbf870e906e560288ece2d7a9153 - pristine_git_object: 4306b4fb2d2d1e154ef5a8432b386899fa081d02 + last_write_checksum: sha1:02ad0dfbe56d6e6396f2f3244e9932e1ac49d886 + pristine_git_object: 31ec954057a9c3a3b71db7fae9ba60cda038be24 src/main/java/com/apideck/unify/models/components/RefundInput.java: id: 05be5265989a - last_write_checksum: sha1:37dd00311af4778dfed16a2d0c550fb6b15f1245 - pristine_git_object: 98bca995de91d1346dce2e5a21e59e3714d64453 + last_write_checksum: sha1:a8d05ea38b0f5ee6cf9546da157a039f68ba49cb + pristine_git_object: 999fa505d8a0a071b146e6709c7fff5bb8468a6b src/main/java/com/apideck/unify/models/components/RefundStatus.java: id: 824e5f12ae73 last_write_checksum: sha1:72cda0a194b510ff328e86e26663ffd533db99db pristine_git_object: 6235dea3c0d4324537694ec3201250de0a7592c1 src/main/java/com/apideck/unify/models/components/RefundType.java: id: d35609529240 - last_write_checksum: sha1:26a27e05d8dd157bc54c946e39da1166e9f19ab7 - pristine_git_object: 9f7faf98910bac6993ad81d7a99c6bfbfd4686db + last_write_checksum: sha1:37ca7ee4084c56acc766972b7619754154bce431 + pristine_git_object: 5278ba41f280c72ae16b79921c446c73ac63b4c0 src/main/java/com/apideck/unify/models/components/RefundsFilter.java: id: 94a3dc02d11d last_write_checksum: sha1:4a3b7513dbb4bb535a2c674487a0ebe8c9f4b838 @@ -11403,6 +11631,26 @@ trackedFiles: id: 1f66ac873eab last_write_checksum: sha1:d02af365cb6fd88c642c46f77a2481533a1f97b1 pristine_git_object: d754c22ab3bb80e45dc41bcfa9892d612ff29f95 + src/main/java/com/apideck/unify/models/components/SalesReceipt.java: + id: dc61d782fc51 + last_write_checksum: sha1:16a7f8bb0c8a5fea3d5a1c2f26ed31c1849a2c69 + pristine_git_object: a0dc28f33e7cec72c4c48a4f98fbbfe3f0b65be7 + src/main/java/com/apideck/unify/models/components/SalesReceiptInput.java: + id: 67391b3d29f6 + last_write_checksum: sha1:28390877048ba1a518ec495846dc2945adf0a238 + pristine_git_object: 18eb21ae81f9525132b4926628d90196b1ea24c0 + src/main/java/com/apideck/unify/models/components/SalesReceiptsFilter.java: + id: faa5e2f836cc + last_write_checksum: sha1:45cf8050f1036cba86add4182b3b1af001d969d2 + pristine_git_object: 36b93db0a2ea21c08813a5918490bcee5a63fba7 + src/main/java/com/apideck/unify/models/components/SalesReceiptsSort.java: + id: c5d707cf3903 + last_write_checksum: sha1:bf0d91ec226195c5a0f50bee42fe54abdb19d88e + pristine_git_object: fed6a416cb21d101ec4c08a8a32ef5d4135f94a5 + src/main/java/com/apideck/unify/models/components/SalesReceiptsSortBy.java: + id: da9c4dc4c78a + last_write_checksum: sha1:dc3b5fd5373b94990df042c5cd540fd651e37e1c + pristine_git_object: 63d0ba80a24c26cd5997a9b9173227bbf897aafa src/main/java/com/apideck/unify/models/components/Schedule.java: id: 11091e03a8cb last_write_checksum: sha1:1c4b565398de1ccf7ae30848d82fad19c064ce9b @@ -11677,8 +11925,8 @@ trackedFiles: pristine_git_object: 97c5b734a7dbc397f679a65c92e1cd4dfb9a705f src/main/java/com/apideck/unify/models/components/Transactions.java: id: 20076d157fdb - last_write_checksum: sha1:924eedfdc6164f5d9c8e575a3f331ab52cc65d6b - pristine_git_object: 51f2307c4f5f2ce6a0c0d14602d144ac59e09d6b + last_write_checksum: sha1:2227839aca00a075d65f4426c0df11032b47ddc9 + pristine_git_object: 0c76515f273dece3906a9e8401146638ed5880f6 src/main/java/com/apideck/unify/models/components/Two.java: id: f1c7c3a961a6 last_write_checksum: sha1:5b85dc5d1268c078ea4b0a5177e2554b8f042a31 @@ -11907,6 +12155,10 @@ trackedFiles: id: 26baaf5e35e5 last_write_checksum: sha1:c100c8f3c610273fb41cf1d81bdc5b3a8d1019ec pristine_git_object: eb54f9a76d3a518c3944ebb58dfcdf067d287713 + src/main/java/com/apideck/unify/models/components/UpdatePaymentMethodResponse.java: + id: bdf67f7abb90 + last_write_checksum: sha1:b102b458a1a9dd616ae98abc2b7a8cc4e8f5a52f + pristine_git_object: 97b5c037d49f26b8559e2b636e64e330b81d70fd src/main/java/com/apideck/unify/models/components/UpdatePaymentResponse.java: id: 435eb01501aa last_write_checksum: sha1:01834b60e810d952502344aeaaf956bcf2f316f0 @@ -11931,6 +12183,10 @@ trackedFiles: id: c19960bebfd4 last_write_checksum: sha1:e9cd95e69ee12bb9af0f55ffa4d486d8e9a917aa pristine_git_object: 719acb62d9c367ba7a8c3f4d86a2dbd7521e7c55 + src/main/java/com/apideck/unify/models/components/UpdateSalesReceiptResponse.java: + id: c2858d890cb2 + last_write_checksum: sha1:d56b4d748deccd49d6cc686c4877f578ed91443d + pristine_git_object: 92f9a2b0f4c3d9c4a8dc831ec159e70ec1e0e5ec src/main/java/com/apideck/unify/models/components/UpdateSharedLinkResponse.java: id: b8b6aa2b1825 last_write_checksum: sha1:c806b71b67ce4336f0af6b02c1ef5c91db1cc620 @@ -12559,6 +12815,26 @@ trackedFiles: id: a06e57038d8b last_write_checksum: sha1:8510bfacd472aa144dd5558bb8b7cf357970f004 pristine_git_object: 630c8467e420817a531e63697b963e397dc8f79c + src/main/java/com/apideck/unify/models/operations//async/AccountingPaymentMethodsAddRequestBuilder.java: + id: 457247fda11d + last_write_checksum: sha1:a9e35b8b2098d8689fc26de192542d0ce68a7a43 + pristine_git_object: 90b780d26acde7999254ef253edf2ace05f03601 + src/main/java/com/apideck/unify/models/operations//async/AccountingPaymentMethodsAllRequestBuilder.java: + id: 6937c6f3aeba + last_write_checksum: sha1:5101ab36fc726348418fd5467be01348c202793a + pristine_git_object: b480148fb602173bc7cb2eb8ddf923de4053cb76 + src/main/java/com/apideck/unify/models/operations//async/AccountingPaymentMethodsDeleteRequestBuilder.java: + id: 4bb3a06fe2d6 + last_write_checksum: sha1:0448a16f796c254028510866d3e96542c85939b9 + pristine_git_object: 2c4770485684cd7eea790be6ab9b584fc4965021 + src/main/java/com/apideck/unify/models/operations//async/AccountingPaymentMethodsOneRequestBuilder.java: + id: 86929b9102d9 + last_write_checksum: sha1:08075538d2f331f8d35afa0a526da3f4f1b9211e + pristine_git_object: 993a9c51a4c3e5fda0e535c88c6bc458d0888990 + src/main/java/com/apideck/unify/models/operations//async/AccountingPaymentMethodsUpdateRequestBuilder.java: + id: 5f26c7690c25 + last_write_checksum: sha1:d7e5b522392a9c4aa985ab9be6daebdd8dbd03d3 + pristine_git_object: 45cf1fe7895927b94ec580bb32423acb819dbf8c src/main/java/com/apideck/unify/models/operations//async/AccountingPaymentsAddRequestBuilder.java: id: 488ae31b5850 last_write_checksum: sha1:2becab7de98aa8ad2adaaee5cb1f429c4fb6b18c @@ -12663,6 +12939,26 @@ trackedFiles: id: 16f0cea35828 last_write_checksum: sha1:e7b403be200d41f274d6724ea34a4fefc7fae53e pristine_git_object: 94239a870bf28d1bd5a5b00c00e49cfc4d8feca8 + src/main/java/com/apideck/unify/models/operations//async/AccountingSalesReceiptsAddRequestBuilder.java: + id: 67759d06b20c + last_write_checksum: sha1:a2dc493c8b9a2d2e924a26e8d5401fdd90b506fc + pristine_git_object: 531bb1a32bcda7a4d55bebeb6f9f2354b4e3e9dd + src/main/java/com/apideck/unify/models/operations//async/AccountingSalesReceiptsAllRequestBuilder.java: + id: 0b3cb1fa88a5 + last_write_checksum: sha1:f48e3f8006e6bf546e3248bc4ac07db9b36fd7f9 + pristine_git_object: cf61edc453ea748d61675f9ad3f7df88b88ce7fc + src/main/java/com/apideck/unify/models/operations//async/AccountingSalesReceiptsDeleteRequestBuilder.java: + id: db2f6b02443d + last_write_checksum: sha1:3b631175218b8dbc09a61e6ea5d6cfae587fbc08 + pristine_git_object: d3c2c6a3b91138f77bd78003514a7fb042d0d400 + src/main/java/com/apideck/unify/models/operations//async/AccountingSalesReceiptsOneRequestBuilder.java: + id: 7f6163eb5af4 + last_write_checksum: sha1:d78d57cae1596030a653b1667af874bb14597a05 + pristine_git_object: a5b8aa72eb8ee939344f9d2c14c1b71e38be1de4 + src/main/java/com/apideck/unify/models/operations//async/AccountingSalesReceiptsUpdateRequestBuilder.java: + id: 8ffd6ebcb9fc + last_write_checksum: sha1:b54e3c0e2d57791473fbd0885da024c4febe9739 + pristine_git_object: 0f295edae337f827999ea13cd0b20baf54c6170a src/main/java/com/apideck/unify/models/operations//async/AccountingSubsidiariesAddRequestBuilder.java: id: 1587f5c6ebc6 last_write_checksum: sha1:7843b3a27b454a6fdcb3dafefefff81e2a77e8b1 @@ -13573,16 +13869,16 @@ trackedFiles: pristine_git_object: d8b57c4f891a8e73703f12a0c4b61ac818ceab49 src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadRequest.java: id: aa022c3975c0 - last_write_checksum: sha1:d020fa88e09a06d73dca9e3f3bbf219043d3dab8 - pristine_git_object: 5c0db9f87eb67663d78b68e34664766b48eed36b + last_write_checksum: sha1:6a7040e2feaf5ea79de0e6012d2d64c1532392f5 + pristine_git_object: 2b58b4ebe94fd01bf8919aa1fcb579a3dd2a181f src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadRequestBuilder.java: id: fa2ae5637eb8 last_write_checksum: sha1:6d276b7233e3411d85aa96a8e34aca9c975534c5 pristine_git_object: 130342b1c0595302ed20466e64cacbd10fb67eec src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadResponse.java: id: a94859ea8ec7 - last_write_checksum: sha1:fe02c6ba9982a3a3392b51ed93c9a5aea2dc437a - pristine_git_object: fc638b288a9b6476bd6bf238bbafa13efbbc0831 + last_write_checksum: sha1:81b9ac14e01ab56c8bc2258c31445f841d8f4497 + pristine_git_object: c3002fe66299f31edd0b5b2d8d01494b03b4472f src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsOneRequest.java: id: 0d329993c5de last_write_checksum: sha1:f3f3aa739ed0952f3854313bd860ac9972d4a61d @@ -14711,6 +15007,66 @@ trackedFiles: id: 3f5aa1400769 last_write_checksum: sha1:3c5a51715a995f2f490049bca4a1098926bc216a pristine_git_object: 87776d8346cc9055e319a89633635b4501aefb53 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequest.java: + id: 2061f3ca6951 + last_write_checksum: sha1:e483434f061084b27e41f40a7aa313ffc821f457 + pristine_git_object: 0c753c1914ed23e565cb84dfad9babe3f7d34e77 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequestBuilder.java: + id: 3351d63b9767 + last_write_checksum: sha1:692b404309c8a332efcc4759844e441b17c500db + pristine_git_object: 4d1f801956a12dae9ede6014870e346491ba319f + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddResponse.java: + id: e1be51ebab91 + last_write_checksum: sha1:d9661556f86393ff5a1763bf040f9bd7feb2dee0 + pristine_git_object: e9fe75a9cb080681fe009bd130d9bb7d2c2458cf + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequest.java: + id: 60df06afc227 + last_write_checksum: sha1:d66f974d16f4ce547454e4659546c9848f1f95fc + pristine_git_object: 851d04ff6dedf54cefee6ce2fdd51c8456682567 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequestBuilder.java: + id: 69fb3336ab20 + last_write_checksum: sha1:ce5273d564ad2d7afc966ead267c2561b4d1ead1 + pristine_git_object: fc41c66ac1b4147db91af32fbd07ae596192d35e + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllResponse.java: + id: c4113c329b97 + last_write_checksum: sha1:38ab97a8045656eb1ef94ab5583730d41e867968 + pristine_git_object: 87e6a7bf06bab37634564e3aa8a9d4864a06f5c6 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequest.java: + id: f86a53bb8a5b + last_write_checksum: sha1:a2b491617e293ac42d71ecd3d2662fd606df7e8f + pristine_git_object: 1b75b2d93318020846134d88eee871ea873c7486 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequestBuilder.java: + id: a38445f093a6 + last_write_checksum: sha1:5e6f62fe7ae0ee41b103d6a90c226f8c2f070313 + pristine_git_object: 53d337ebc42fd127bab9aa46b05f3da0e293a7d5 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteResponse.java: + id: c0ef96f4d2b8 + last_write_checksum: sha1:6664bf846aef0c3ab3385ed13751ec039b3a6b5c + pristine_git_object: 9281ef874b691d230db723a60b7d255f955402c1 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequest.java: + id: 8a3e3d331edf + last_write_checksum: sha1:d36a3fa8d76c8e3d16469435f9643e9f1c38da45 + pristine_git_object: b60959a68116614870184376f78c7cd06ccc0b62 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequestBuilder.java: + id: bbe7fa758b80 + last_write_checksum: sha1:f64e4ac59b33426fb0b7340eacd8fcd49c77abb1 + pristine_git_object: e97e869892adbcc5b6da7bdd708217e4e5a25cc1 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneResponse.java: + id: 2d125445ce81 + last_write_checksum: sha1:682687024c64ab7f93c48c115883045e6822bf17 + pristine_git_object: cf405afd21cf38c5e4ecce6d56b0f613d0b3b0bc + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequest.java: + id: c38a770ca162 + last_write_checksum: sha1:74148aee2eb2071be672d6474bb2c4cf3f64df29 + pristine_git_object: c2e295f5d5d5cd4ea5dffd0c672c0149d72a2e23 + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequestBuilder.java: + id: e4cfe10ca30d + last_write_checksum: sha1:e187effea9b8f99841230c004c7c0970baf3e290 + pristine_git_object: ea0126cf7cbd7f9768f417f199132966c616971a + src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateResponse.java: + id: 19c32c4c439f + last_write_checksum: sha1:f850a384e48f2e9c39ea32c1d440c137613f0ed2 + pristine_git_object: ca830654a19eedf434dddf1f4ea83e0c7458c341 src/main/java/com/apideck/unify/models/operations/AccountingPaymentsAddRequest.java: id: 5a12047cef6d last_write_checksum: sha1:82aa1423da7d08164fd8284f38f53cd1afddcfb3 @@ -15023,6 +15379,66 @@ trackedFiles: id: aa8bfb5b7301 last_write_checksum: sha1:a24522aadf8181f9cf50e77edcef1b63c04983c2 pristine_git_object: 8cae477cf375b0d217509bd3d582dacd0d65c823 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequest.java: + id: 98449c217e35 + last_write_checksum: sha1:5cc9197536556d40a06c2bce72ffb713b7fdd36b + pristine_git_object: 38398a79b0f2c9c81b48ce7693cc8dea3f30ba1e + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequestBuilder.java: + id: 5fd980f0104e + last_write_checksum: sha1:a1eca102bb7e7fe80f45a30ab3e7eecdf3dd2619 + pristine_git_object: 51ca36f8b6e2262506f9ce73baf12e1929d44648 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddResponse.java: + id: d67d8feb46dd + last_write_checksum: sha1:dcdc6bbfc4c29afe4285e159326c5f1cd91a492d + pristine_git_object: ae3629f683f2589489bb1deffada291f30b6624a + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequest.java: + id: c3aa3d02ef24 + last_write_checksum: sha1:e5297cb2ca76dc61970f288487e2ed8999b3480a + pristine_git_object: 5cfa9cfa54b33ddaf2a0bc0fe21f2fee9f7a59f9 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequestBuilder.java: + id: 36af53781625 + last_write_checksum: sha1:44a3fc31fc6e836bb95481db4641ea1a9843d715 + pristine_git_object: 764b91a7d6ca939f7e2c5b801d47306175bbd3c3 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllResponse.java: + id: 5e202908d4f4 + last_write_checksum: sha1:fd3117a4b21d76857312b84ef3e0b36fffbe77e0 + pristine_git_object: 0d43e5eb77c305d7b272e32a00241c8f86249f74 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequest.java: + id: 5f694565276a + last_write_checksum: sha1:7970812c12b45e9b3d65e54e70ec6cec65110182 + pristine_git_object: 1b5388d32f8b73628975eb7362abf5fa8c9b3b5c + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequestBuilder.java: + id: 654ca9d2053f + last_write_checksum: sha1:3b06494fa28aa00e1edb6c2fe4d645374590d71d + pristine_git_object: cbccd4f3235534dbc0ca231344cf7eb90593d96d + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteResponse.java: + id: 01676ef5fbf5 + last_write_checksum: sha1:15ff5e8c443eabc3ca3d1751ed627bd1ec5fe803 + pristine_git_object: 8fc3d9751365c6b9b7063e8cbc3aacb5063d8cc2 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequest.java: + id: db8a3a3c3d72 + last_write_checksum: sha1:da58b7cfdd962ae15255dde853870f4eff8db55d + pristine_git_object: 3bc95d6cd66b578438ed594b67ae122e2149ccae + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequestBuilder.java: + id: 6e7611bf0676 + last_write_checksum: sha1:aa17d2a46ac32885f8372a270a50f400181ccaf0 + pristine_git_object: 48bb9ebe3d61ac2960339fe6dbff50517155d411 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneResponse.java: + id: 4d0c686442d5 + last_write_checksum: sha1:b7fac4f43497c4d60b578400513c118019264ff1 + pristine_git_object: 573a5da98e557ae88ff483530856b1664e725c95 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java: + id: 56a03128519f + last_write_checksum: sha1:a6cea5f79fd5d56f4203d6e0f32d36732f74f225 + pristine_git_object: 3c3101112ea04a3f47bb22f9b7ed2a2014ee60a6 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequestBuilder.java: + id: ea194b8597b5 + last_write_checksum: sha1:bed00460fce9a07baad2b05c46585f9321f4d89c + pristine_git_object: ad95a2ed1b3277331b1bd4295f5e8368d14d8076 + src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateResponse.java: + id: 25fe30db2733 + last_write_checksum: sha1:3d81b0dc77dced158d62db9a36ada4ba0b549f26 + pristine_git_object: 0540d439d5898de6abc33afc4dab5f9bc6c6afbd src/main/java/com/apideck/unify/models/operations/AccountingSubsidiariesAddRequest.java: id: a075a59846b6 last_write_checksum: sha1:965e5dee68971793fc31c93a9e31cfb6fbf432fe @@ -16405,16 +16821,16 @@ trackedFiles: pristine_git_object: 5a68771839c0292888814a8c966f4f2e728cbb0c src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadRequest.java: id: 8ca683432a45 - last_write_checksum: sha1:dc374ebc5e37eb9d64c862be888f694e211b1bfb - pristine_git_object: 9d27bbd2504a6baa62e9899926a152d0e34886a7 + last_write_checksum: sha1:566bf056bd208b866f0d4a6a7e5813d1ab6100a9 + pristine_git_object: 8fa80a4895e85984534d64292bd5d63704944762 src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadRequestBuilder.java: id: 060a4576410b last_write_checksum: sha1:26f8a35470636932ee63388c1d6e0065ed5a51cf pristine_git_object: 44b7f037515758943091168281d830bf570628c6 src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadResponse.java: id: 73d7768d6203 - last_write_checksum: sha1:79c123dd3384b42730c6137c40eb8cd37ce3526a - pristine_git_object: b189ee5937bdc9d918dadfe785695dbb65fc7044 + last_write_checksum: sha1:b4992c0d06b56691d6f90d19d75fb2f0208bf79c + pristine_git_object: c231f77412303c8875b0e20578091bc7d82eb372 src/main/java/com/apideck/unify/models/operations/FileStorageFilesExportRequest.java: id: f09ddb056c69 last_write_checksum: sha1:e82b66a6039f0749f3a803e403a03cbf3aa01064 @@ -16425,8 +16841,8 @@ trackedFiles: pristine_git_object: 403b09b698d5d132a4faf924c1a53636a00a84f2 src/main/java/com/apideck/unify/models/operations/FileStorageFilesExportResponse.java: id: 3f46233dca29 - last_write_checksum: sha1:21f19263f40a5bca969533d2d79a17b9416ba21c - pristine_git_object: 2a46706a34b8c65a724f43adfd975a8f7f1c56fd + last_write_checksum: sha1:b55cc1f380aa38ff485c870b15d097b45c676659 + pristine_git_object: 6acec791b16235a8b65d4ed841d51279008d0bdc src/main/java/com/apideck/unify/models/operations/FileStorageFilesOneRequest.java: id: 888688daca5e last_write_checksum: sha1:1434ebadde6d835a7f1c76085c95d2dfc18f1410 @@ -17133,44 +17549,44 @@ trackedFiles: pristine_git_object: bc3a9179946304964ba4dc5bdf8d01236e16f742 src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyRequest.java: id: 83cf052ddb3f - last_write_checksum: sha1:acc230524f4287487641ba0eed037daa6a8f38a1 - pristine_git_object: 746290f777d772119edf1ea01295cc0b927dab99 + last_write_checksum: sha1:a8e9c759873e59325b9e8cb59d35436b195cc3e1 + pristine_git_object: 34b0e344785252249b142b0c168b6b7613aac619 src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyRequestBuilder.java: id: 110b1170ae0e last_write_checksum: sha1:78deeccf8b308434f1e9b77c6934e868459ed1c5 pristine_git_object: 29a4425cc11dc54ca83af6e9f208ee479d8531de src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyResponse.java: id: 34a93e2b44c0 - last_write_checksum: sha1:08a7ebaabc4c97502e9706b9e933662d057898f5 - pristine_git_object: 21236df0ec4055efc5304b6f1fb03d190c694087 + last_write_checksum: sha1:f48ef76b84dfd0fc56ad1677e24fff72b482bb6d + pristine_git_object: 7216da807426e6e43ecb17de79fc4a1b51622029 src/main/java/com/apideck/unify/models/operations/ProxyGetProxyRequest.java: id: 6bd0038d8c3f - last_write_checksum: sha1:e9cc185efab10a6a74079c107349bf43e917cf4a - pristine_git_object: 2db80fdd5387afe13be66725494170379ee31009 + last_write_checksum: sha1:44beb119128d873b495c1d687fee6d14dfa7adaa + pristine_git_object: 19e9d5edd524b2e712ccfd6767333403e131da39 src/main/java/com/apideck/unify/models/operations/ProxyGetProxyRequestBuilder.java: id: e40fbfb93403 last_write_checksum: sha1:e2e2237ff9cc53410467eb3bea77a83b02b718f3 pristine_git_object: c5c6601eadb13c850151042bfbeb1ff97b388282 src/main/java/com/apideck/unify/models/operations/ProxyGetProxyResponse.java: id: 878f4bcc0b00 - last_write_checksum: sha1:0eca21b7b17e1cbfa966490ce83757ed0bba299f - pristine_git_object: 8a414b5a1209f2e6e9aad71db050c49750f9b9fa + last_write_checksum: sha1:35c777950dbb801ca6a1ec71d5ce3bbe2208d56e + pristine_git_object: e15117552e28fa38fd050cfc47f6854be84bc5a2 src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyRequest.java: id: f62956f47f77 - last_write_checksum: sha1:1ee8c6b9f4978f3d9da51d502b1ede02649f043d - pristine_git_object: 44fb43f9cbc346519dedcc361af8673fa8a090af + last_write_checksum: sha1:a6f5fce4892c7232e0c7f974b5a8fc971a5c71cc + pristine_git_object: 39a02ce3c770c2c501cc8f5c18e853914d5f8b8e src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyRequestBuilder.java: id: 8c4b0b6f34b7 last_write_checksum: sha1:09be29d337c9883677d5c1ea4cf65748bd66e88c pristine_git_object: 9ea5d9e725c46f356472a692c758845bd5148b02 src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyResponse.java: id: dc3b7001d369 - last_write_checksum: sha1:0f66ef39d6fdf0602800337631265e6c16a17c01 - pristine_git_object: c7b418c794506c67f64a96219c0d5ffe48a9dec7 + last_write_checksum: sha1:202e094031c7c40d0be1453f06055cb6f0ecbff9 + pristine_git_object: 84684bd1121b93352bfaa241d9d85ffaa1b614b3 src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyRequest.java: id: 5258f1650153 - last_write_checksum: sha1:bf9366fef3d787537165a608520ab8643d36e9d6 - pristine_git_object: acee110213343816ee73304610577b04916a551e + last_write_checksum: sha1:30b9255ffaa141a430839363fb4ed4650b4f4100 + pristine_git_object: b0c5d0ac157c036c8be66cc5060491d17291b23d src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyRequestBody1.java: id: 45c150240945 last_write_checksum: sha1:263414a95b7ce1b5a99659bd64bc03b920758123 @@ -17185,32 +17601,32 @@ trackedFiles: pristine_git_object: 6e6a408547684a142cc66484aa5a8a8df8cc6ccf src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyResponse.java: id: 931ecd90aa60 - last_write_checksum: sha1:3d0b36decf2475abda6c34c8590bbc3bc23f2329 - pristine_git_object: 0bab812d6802aa3ebd94c460e4599cd7a732e59e + last_write_checksum: sha1:471bbd771dfde7dea0739608e793fc785edc34de + pristine_git_object: ca5ca8f4487f1fe841547f38a984ce1c706a73f7 src/main/java/com/apideck/unify/models/operations/ProxyPostProxyRequest.java: id: d07112620146 - last_write_checksum: sha1:88145fe699788aff2c4053fb0855c7d682b8a90f - pristine_git_object: 5021f9375fb73ebe20d68b820652682864566c97 + last_write_checksum: sha1:62b4fa8e93244bb8a12c0a3f20010dfea1941f83 + pristine_git_object: 02bc7e301a7ce1a806759f12ad664021689f73c4 src/main/java/com/apideck/unify/models/operations/ProxyPostProxyRequestBuilder.java: id: d768f945b86b last_write_checksum: sha1:b315f491a566f1694f440d4e6588933a42030e08 pristine_git_object: e4588647fd833b5eead023c0ee54d2eeff9b1d01 src/main/java/com/apideck/unify/models/operations/ProxyPostProxyResponse.java: id: 5ec27c00609a - last_write_checksum: sha1:6e0cd97f245881f942e56853c71a260c361daf21 - pristine_git_object: 75b8e5c87723f5ffc82104cbc64a04f527e025f0 + last_write_checksum: sha1:d93b6e212e4c4b21dfd7422e35bcf40f9e9cbcd5 + pristine_git_object: c5bfcf42b19c06741bdc98523e011f4423c7dc11 src/main/java/com/apideck/unify/models/operations/ProxyPutProxyRequest.java: id: eb327f1a4a20 - last_write_checksum: sha1:9b807e4fad721da2637f97a24e9bf28981d96d64 - pristine_git_object: 9b229e01ff9ffadd3d3590a587693e7dbcb3919a + last_write_checksum: sha1:044ffd58cf583c8a5258d0d63b8672ff6352da92 + pristine_git_object: f99aab15df1287c9768892797744061238cb0333 src/main/java/com/apideck/unify/models/operations/ProxyPutProxyRequestBuilder.java: id: f62fb4607328 last_write_checksum: sha1:e7fd69a91cbbb93631ccbf358a1670ae749600a8 pristine_git_object: 7a4389fc2b55d68d5291cd3f673180cf4721e655 src/main/java/com/apideck/unify/models/operations/ProxyPutProxyResponse.java: id: "561198808179" - last_write_checksum: sha1:e266430acb5e9a025b80797d469e3bccfe665cbc - pristine_git_object: e569f7a78f542a4703b5e52a058b7c2b96dfe951 + last_write_checksum: sha1:7777e48be8d5de31ad321737dfdaceb917516684 + pristine_git_object: 40f5aea0cdd135ffb9461681079a0e1084d139f3 src/main/java/com/apideck/unify/models/operations/RequestBody1.java: id: c94f4e8cafbd last_write_checksum: sha1:44e88203f3dca2eb4a441ec29ca5330b4def8366 @@ -17657,8 +18073,8 @@ trackedFiles: pristine_git_object: b719da2dfd03932a9d690480be7ad9efa53ac768 src/main/java/com/apideck/unify/models/operations/async/AccountingAttachmentsDownloadResponse.java: id: 033be42ad089 - last_write_checksum: sha1:d517113509fb670109b7cb3fe7164dcf4fc85bbc - pristine_git_object: 8a7bfd685308c3b8bbf3277ce40629fc96afef95 + last_write_checksum: sha1:85e98c2de84b3680200fe20238e6d64740ec0fbc + pristine_git_object: a6da5184f7b9dd23f736c74f611dcfeba96a9b7f src/main/java/com/apideck/unify/models/operations/async/AccountingAttachmentsOneResponse.java: id: 088883f4cdde last_write_checksum: sha1:a20924c3587e9e6174f7df5a1dab710af7490016 @@ -18035,6 +18451,26 @@ trackedFiles: id: 97c631eaec11 last_write_checksum: sha1:c892422f6227208e522af9347c0eb1510ad39174 pristine_git_object: 264dbff677fdb5d56608e30aeb3b075c633eb8a9 + src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddResponse.java: + id: 66caffb5fcd2 + last_write_checksum: sha1:96dcb7b6a4ae073f93319c9f1eb237eb8b0a946b + pristine_git_object: 8e86801bdf91beef9f2ad5e86918efa7f0e7bcd8 + src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllResponse.java: + id: 924b69ab038e + last_write_checksum: sha1:ae8fda0a086aaa6bddf34b25ae2a3cd6a84c5d3c + pristine_git_object: 6a55db5288f470a62244b954a9ab55152571d472 + src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteResponse.java: + id: f71b4e5993ca + last_write_checksum: sha1:64f538af77ef19417e9a0e53fc8748892e0a146d + pristine_git_object: 22f78428c6d005bd24555eee8a4ffd16cb93dcd9 + src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneResponse.java: + id: 231d24dc1b51 + last_write_checksum: sha1:cd19ae7b26b52b38c03e70e91cf49b1320075fe8 + pristine_git_object: 8a1af93357de00d9cdaa9eb897142431263a68a2 + src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateResponse.java: + id: 4f3f6725855c + last_write_checksum: sha1:5d906071b34087142719c009fad0349e16b7e9ab + pristine_git_object: 075bffc5fccac170e26b586616339ba49a30019c src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentsAddResponse.java: id: a1e11e678862 last_write_checksum: sha1:18bf9ce910c4a7c46df44c39381953532973ef17 @@ -18139,6 +18575,26 @@ trackedFiles: id: 8939220c3057 last_write_checksum: sha1:61c010a86ad98cd4fe5aa2796f215d7746065ae0 pristine_git_object: bcc4e2f11b4bc6c6377d803e58d2aef8e1ef4ac0 + src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddResponse.java: + id: d96c30eea656 + last_write_checksum: sha1:9210433d8ab94ab59c4cf4874a57c8c065855239 + pristine_git_object: 9ed58ab6619938bc67f99e9ff8e83e3ba6a975ff + src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllResponse.java: + id: 0a6415e7c7c3 + last_write_checksum: sha1:7d7a52ed888f79e6ee7d67271184db3aa306b614 + pristine_git_object: d838b53a2f0f086e23ee5d2379832ddfcea08e05 + src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteResponse.java: + id: 3a370cff4dd9 + last_write_checksum: sha1:7c428e3968793a226b809f7b77d5766f8c8a9129 + pristine_git_object: 6f651b7ba816cfffbc42184be7d3c01a247454cd + src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneResponse.java: + id: 5c4c4cd894d8 + last_write_checksum: sha1:917ba1058edb3b49717667f51e4b25c6228d58f8 + pristine_git_object: e369307d36fd984042f511104399a73baf5f47a3 + src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateResponse.java: + id: d1ae38357170 + last_write_checksum: sha1:660e733ed0b6115d1a00875ee47d28c49383181f + pristine_git_object: ab0c0eb170a261ff447f7a179aaca182dfc1f22a src/main/java/com/apideck/unify/models/operations/async/AccountingSubsidiariesAddResponse.java: id: 50c4d8ca3689 last_write_checksum: sha1:b0244f079387a7f343da7b7ad9078de6161d9019 @@ -18601,12 +19057,12 @@ trackedFiles: pristine_git_object: 38fe8b6353b28f5ea1b7caac1d847494d03f1362 src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesDownloadResponse.java: id: 21eb5e82e7f3 - last_write_checksum: sha1:d6d13450168717fca6073f504bd010a770f9ccd0 - pristine_git_object: 635c8a95fe7424b1e2c6ad735251680c7056e655 + last_write_checksum: sha1:e4474b82d7a3d4832d52f30497a8d661451f796e + pristine_git_object: e0f982a9e4b55b67f79d0d99adf5991d96f8d654 src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesExportResponse.java: id: bed512b829d3 - last_write_checksum: sha1:f7108002bdfc7ec8067349ac3257525492794a16 - pristine_git_object: 85c6ebb30c00e926b96866d5eab3e1b4a4f12906 + last_write_checksum: sha1:51d70981ff7a3ab335ccc14c5183fefb56c86d6c + pristine_git_object: 990c7ce3d0ec3a43b775173ffa32fce42c38b81c src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesOneResponse.java: id: 9f913af9fea0 last_write_checksum: sha1:a0512723edf07ef7ef79dd4f05ce8e58cfd0916c @@ -18841,28 +19297,28 @@ trackedFiles: pristine_git_object: a5f16bfc5cbabbb2c34c526f9deff74b730b637d src/main/java/com/apideck/unify/models/operations/async/ProxyDeleteProxyResponse.java: id: c96ff0818b2d - last_write_checksum: sha1:fe53b91ea10afd6c35be29e286856870ee034a9d - pristine_git_object: 987a3ba5fe15f682eaee15e0d257ba11cd981a44 + last_write_checksum: sha1:263fa769ce083ecbbc2e52aa86214d36a8c66cc8 + pristine_git_object: b85d65f5feebe66ec65ebdb577422378ed286c54 src/main/java/com/apideck/unify/models/operations/async/ProxyGetProxyResponse.java: id: aa0905e2717c - last_write_checksum: sha1:b3f9d70293a78709e9189ab9592e134026419b3b - pristine_git_object: 39c66e3054ae20621602ac4208c506aa044d34be + last_write_checksum: sha1:b924383a01a53f24a039af173320cc4452323233 + pristine_git_object: dda99bffe5c8ce10f2da37f1202c306177d6ca06 src/main/java/com/apideck/unify/models/operations/async/ProxyOptionsProxyResponse.java: id: 48881326c42a - last_write_checksum: sha1:aaf78d3945f2010f10c9cc5f42940bc66cae6b7e - pristine_git_object: 329af92c6e505dea9e385b046e1ca9d886c8c672 + last_write_checksum: sha1:632bdd6934848d4c82a165478d84352c0d92e24d + pristine_git_object: 66b3634fdee7931a7ea5f9c2434aff1955224293 src/main/java/com/apideck/unify/models/operations/async/ProxyPatchProxyResponse.java: id: 101bb7a188ab - last_write_checksum: sha1:80855c26b57357aa44528b439279dae2fafed3f9 - pristine_git_object: e35f757a833117e6e3ea5d92c9f98487c21f3aca + last_write_checksum: sha1:7a06a0a8c432fae33e197fa5035a9191cc7777c8 + pristine_git_object: 92bc161ef5ca1a68f8f930de160ccd3269cb865e src/main/java/com/apideck/unify/models/operations/async/ProxyPostProxyResponse.java: id: 16fc0c59884e - last_write_checksum: sha1:ec3634584bf0d52e6533c3d402d1be68ceaef448 - pristine_git_object: 50253a6453a124806466eb9d9f7f6d55534fd30e + last_write_checksum: sha1:705fa3e6def7a5ffd67bdf92d2c4fc86db7b26e3 + pristine_git_object: d52a55230af8655e2fb836474e8608a4b770f116 src/main/java/com/apideck/unify/models/operations/async/ProxyPutProxyResponse.java: id: cce9a0f12e94 - last_write_checksum: sha1:1ff994288a57f2db86d8beafdf6a566e86a52f59 - pristine_git_object: 5f75d0fb119e1f83b714750545d8ac65ad1cea8b + last_write_checksum: sha1:dc9859f26d6be96e57b57bdaf96044371dbd9b1a + pristine_git_object: 4dc7a2a5ae8ee5efe883602c551537100aedf003 src/main/java/com/apideck/unify/models/operations/async/SmsMessagesAddResponse.java: id: 18e55b7077e2 last_write_checksum: sha1:86ae8a6d30c3e8c2dda6919b272c23030c63aac4 @@ -19395,6 +19851,26 @@ trackedFiles: id: 9fabf83e401e last_write_checksum: sha1:01714da8d2e58cdadfe9b212f3cbe4103507262f pristine_git_object: 0ba50c534d22f90553d936aba4c05bd8d7a56cbf + src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAdd.java: + id: 801543977af3 + last_write_checksum: sha1:ccc45845cd3929d48206234d88a95aeec358613b + pristine_git_object: 1a7b14872e63f586430853feb6d8805f634fe670 + src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAll.java: + id: 5a16aca489dd + last_write_checksum: sha1:4aea9798230bea0f6e5545a6429d99f7acd3ef3c + pristine_git_object: 573349b1e5c26166f3e80bc8fa826af7a767f324 + src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsDelete.java: + id: e6d2c4863ff6 + last_write_checksum: sha1:d2a1aa1488a7620b2bfc202c6cafe6d51fc0f416 + pristine_git_object: 59f2f07c2677fd69e93d26e4a64b11a4ad5ce1b3 + src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsOne.java: + id: 1b68a17b31d2 + last_write_checksum: sha1:5cceba09a3e263ac1b0761fe6741c7b7c984bb26 + pristine_git_object: 36b6023696dbc5c8bdc09302e46a21edda7f5727 + src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsUpdate.java: + id: be6ddd37ed4e + last_write_checksum: sha1:a0fc1dfc3519e1bf874aeb13ff83ef6cc347d601 + pristine_git_object: 666d6a92ae9e0f61923d46e1c707d7cb83c7bf6c src/main/java/com/apideck/unify/operations/AccountingPaymentsAdd.java: id: 43b59e4c504f last_write_checksum: sha1:afba4d674868d1971df78bcd1a8e02fa95085846 @@ -19499,6 +19975,26 @@ trackedFiles: id: 07bf563b44b7 last_write_checksum: sha1:35a534fe769a780f7cac2584c137b995ca5adb69 pristine_git_object: 536d6af013f9dc0a64ff01808db00204c4e02fb1 + src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAdd.java: + id: 26b12a287cc2 + last_write_checksum: sha1:c134defaf67df225ee994cb11688d196ea00f4c4 + pristine_git_object: 2d20be953a8b0d948451cf2579a506bbcde6cd1e + src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAll.java: + id: d41311809d2b + last_write_checksum: sha1:56c55ec7fab407528dac5c82d6477155622476da + pristine_git_object: 5000de6ccfd57f7de355f133bbc8f4538e66a5a4 + src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsDelete.java: + id: 1f0fcd1bdcd5 + last_write_checksum: sha1:02f8546691e2bb5239df86f71466f185b8fb5c03 + pristine_git_object: 5c9c73232fbf40b514742925035811f60d95dde2 + src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsOne.java: + id: 4affe072d0fd + last_write_checksum: sha1:5d9fea51db64af35b0788294d86b458b0cf979e3 + pristine_git_object: 74ad08e39b5fde5ea54425ba708a956928f07a9b + src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java: + id: 7fbef6a6f381 + last_write_checksum: sha1:c9bc7cecf8cc05f8a021130644cb9b00604b58b6 + pristine_git_object: 7866328977c3a17204f03d0b3178cb1df61acfa3 src/main/java/com/apideck/unify/operations/AccountingSubsidiariesAdd.java: id: 5cf8dd907b42 last_write_checksum: sha1:0905fe6a0998579269f8ac91eec8c612911de698 @@ -24790,7 +25286,7 @@ examples: x-apideck-company-id: "12345" responses: "200": - application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "one", "data": {"id": "12345", "display_id": "sample ID", "name": "sample.jpg", "mime_type": "image/jpeg", "size": 1810673, "reference": {"type": "invoice", "id": "12345"}, "description": "A sample image", "parent_folder_id": "123", "updated_by": "12345", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}, "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}} + application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "payments", "operation": "one", "data": {"id": "12345", "display_id": "sample ID", "name": "sample.jpg", "mime_type": "image/jpeg", "size": 1810673, "reference": {"type": "invoice", "id": "12345"}, "description": "A sample image", "file_url": "https://example.com/files/sample.jpg", "parent_folder_id": "123", "updated_by": "12345", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}, "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}} "400": application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} "401": @@ -24899,6 +25395,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" x-apideck-company-id: "12345" + x-apideck-follow-redirects: false responses: "200": '*/*': "x-file: example.file" @@ -25911,7 +26408,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} + application/json: {"bank_account_type": "bank", "source_account_id": "src_456", "source_routing_number": "021000021", "source_account_number": "123465", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "balance": 25000, "available_balance": 24500, "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} responses: "201": application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "add", "data": {"id": "12345"}} @@ -25968,7 +26465,7 @@ examples: x-apideck-company-id: "12345" responses: "200": - application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "one", "data": {"id": "12345", "bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345", "created_by": "12345"}, "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}} + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "one", "data": {"id": "12345", "bank_account_type": "bank", "source_account_id": "src_456", "source_routing_number": "021000021", "source_account_number": "123465", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "balance": 25000, "available_balance": 24500, "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345", "created_by": "12345"}, "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}} "400": application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} "401": @@ -26020,7 +26517,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" requestBody: - application/json: {"bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} + application/json: {"bank_account_type": "bank", "source_account_id": "src_456", "source_routing_number": "021000021", "source_account_number": "123465", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "balance": 25000, "available_balance": 24500, "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} responses: "200": application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "update", "data": {"id": "12345"}} @@ -29796,6 +30293,7 @@ examples: x-apideck-consumer-id: "test-consumer" x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" + x-apideck-follow-redirects: false responses: "200": '*/*': "x-file: example.file" @@ -36227,6 +36725,7 @@ examples: x-apideck-downstream-url: "https://api.close.com/api/v1/lead" x-apideck-downstream-authorization: "Bearer " x-apideck-timeout: 30000 + x-apideck-follow-redirects: false responses: "200": application/json: {"key": "", "key1": "", "key2": ""} @@ -36253,6 +36752,7 @@ examples: x-apideck-downstream-url: "https://api.close.com/api/v1/lead" x-apideck-downstream-authorization: "Bearer " x-apideck-timeout: 30000 + x-apideck-follow-redirects: false responses: "200": application/json: {"key": "", "key1": ""} @@ -36279,6 +36779,7 @@ examples: x-apideck-downstream-url: "https://api.close.com/api/v1/lead" x-apideck-downstream-authorization: "Bearer " x-apideck-timeout: 30000 + x-apideck-follow-redirects: false responses: "200": application/json: {"key": ""} @@ -36305,6 +36806,7 @@ examples: x-apideck-downstream-url: "https://api.close.com/api/v1/lead" x-apideck-downstream-authorization: "Bearer " x-apideck-timeout: 30000 + x-apideck-follow-redirects: false responses: "200": application/json: {"key": ""} @@ -36331,6 +36833,7 @@ examples: x-apideck-downstream-url: "https://api.close.com/api/v1/lead" x-apideck-downstream-authorization: "Bearer " x-apideck-timeout: 30000 + x-apideck-follow-redirects: false responses: "200": application/json: {"key": "", "key1": ""} @@ -36357,6 +36860,7 @@ examples: x-apideck-downstream-url: "https://api.close.com/api/v1/lead" x-apideck-downstream-authorization: "Bearer " x-apideck-timeout: 30000 + x-apideck-follow-redirects: false responses: "200": application/json: {"key": "", "key1": ""} @@ -37190,8 +37694,284 @@ examples: application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} default: application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.salesReceiptsAll: + speakeasy-default-accounting-sales-receipts-all: + parameters: + query: + raw: false + limit: 20 + filter: {"updated_since": "2020-09-30T07:43:32.000Z", "customer_id": "123abc"} + sort: {"by": "updated_at", "direction": "desc"} + pass_through: {"search": "San Francisco"} + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + x-apideck-company-id: "12345" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "sales-receipts", "operation": "all", "data": [], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.salesReceiptsAdd: + speakeasy-default-accounting-sales-receipts-add: + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + x-apideck-company-id: "12345" + requestBody: + application/json: {"number": "SR-00001", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 250, "total_amount": 49.99, "total_tax": 25, "transaction_date": "2021-05-01T12:00:00.000Z", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "service_date": "2024-01-15", "category_id": "12345", "location_id": "12345", "department_id": "12345", "subsidiary_id": "12345", "shipping_id": "12345", "memo": "Some memo", "prepaid": true, "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services", "tax_recoverability": "Fully_Recoverable", "tax_method": "Due_to_Supplier", "worktags": [{"id": "123456", "value": "New York"}], "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "ref_name": "Marketing", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "tax_code": "1234", "discount_percentage": 5.5, "discount_amount": 25, "note": "Thank you for your purchase", "customer_memo": "Thank you for your business and have a great day!", "reference": "REF-123456", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "department": {"display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "ref_name": "Marketing", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "sales-receipts", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.salesReceiptsOne: + speakeasy-default-accounting-sales-receipts-one: + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + x-apideck-company-id: "12345" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "sales-receipts", "operation": "one", "data": {"id": "123456", "number": "SR-00001", "customer": {"id": "12345", "display_id": "CUST00101", "display_name": "Windsurf Shop", "company_name": "The boring company", "email": "boring@boring.com"}, "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 250, "total_amount": 49.99, "total_tax": 25, "transaction_date": "2021-05-01T12:00:00.000Z", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "service_date": "2024-01-15", "category_id": "12345", "location_id": "12345", "department_id": "12345", "subsidiary_id": "12345", "shipping_id": "12345", "memo": "Some memo", "prepaid": true, "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services", "tax_recoverability": "Fully_Recoverable", "tax_method": "Due_to_Supplier", "worktags": [{"id": "123456", "value": "New York"}], "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "ref_name": "Marketing", "description": "Employee Level", "value": null}], "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z"}], "tax_code": "1234", "discount_percentage": 5.5, "discount_amount": 25, "note": "Thank you for your purchase", "customer_memo": "Thank you for your business and have a great day!", "reference": "REF-123456", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "department": {"id": "12345", "display_id": "123456", "name": "Acme Inc.", "downstream_id": "12345"}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "ref_name": "Marketing", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}, "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.salesReceiptsUpdate: + speakeasy-default-accounting-sales-receipts-update: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + x-apideck-company-id: "12345" + requestBody: + application/json: {"number": "SR-00001", "customer": {"id": "12345", "display_name": "Windsurf Shop", "email": "boring@boring.com"}, "currency": "USD", "currency_rate": 0.69, "tax_inclusive": true, "sub_total": 250, "total_amount": 49.99, "total_tax": 25, "transaction_date": "2021-05-01T12:00:00.000Z", "payment_method": "cash", "payment_method_reference": "123456", "payment_method_id": "12345", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "line_items": [{"id": "12345", "row_id": "12345", "code": "120-C", "line_number": 1, "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.", "type": "sales_item", "tax_amount": 27500, "total_amount": 27500, "quantity": 1, "unit_price": 27500.5, "unit_of_measure": "pc.", "discount_percentage": 0.01, "discount_amount": 19.99, "service_date": "2024-01-15", "category_id": "12345", "location_id": "12345", "department_id": "12345", "subsidiary_id": "12345", "shipping_id": "12345", "memo": "Some memo", "prepaid": true, "item": {"id": "12344", "code": "120-C", "name": "Model Y"}, "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services", "tax_recoverability": "Fully_Recoverable", "tax_method": "Due_to_Supplier", "worktags": [{"id": "123456", "value": "New York"}], "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "ref_name": "Marketing", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345"}], "tax_code": "1234", "discount_percentage": 5.5, "discount_amount": 25, "note": "Thank you for your purchase", "customer_memo": "Thank you for your business and have a great day!", "reference": "REF-123456", "billing_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "shipping_address": {"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}, "department": {"display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "ref_name": "Marketing", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "sales-receipts", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.salesReceiptsDelete: + speakeasy-default-accounting-sales-receipts-delete: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + x-apideck-company-id: "12345" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "sales-receipts", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.paymentMethodsAll: + speakeasy-default-accounting-payment-methods-all: + parameters: + query: + raw: false + limit: 20 + fields: "id,updated_at" + pass_through: {"search": "San Francisco"} + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PaymentMethods", "operation": "all", "data": [], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": null}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.paymentMethodsAdd: + speakeasy-default-accounting-payment-methods-add: + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"name": "Cash", "type": "cash", "status": "active", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PaymentMethods", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.paymentMethodsOne: + speakeasy-default-accounting-payment-methods-one: + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PaymentMethods", "operation": "one", "data": {"id": "12345", "name": "Cash", "type": "cash", "status": "active", "downstream_id": "12345", "row_version": "1-12345", "updated_by": "12345", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}, "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}, "total_count": 1, "warnings": [{"type": "downstream_request_failed", "status_code": 429, "operation": "getManager"}]}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.paymentMethodsUpdate: + speakeasy-default-accounting-payment-methods-update: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"name": "Cash", "type": "cash", "status": "active", "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PaymentMethods", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.paymentMethodsDelete: + speakeasy-default-accounting-payment-methods-delete: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "PaymentMethods", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Java SDK Changes:\n* `apideck.accounting.salesReceipts.list()`: **Added**\n* `apideck.accounting.salesReceipts.create()`: **Added**\n* `apideck.accounting.salesReceipts.get()`: **Added**\n* `apideck.accounting.salesReceipts.update()`: **Added**\n* `apideck.accounting.salesReceipts.delete()`: **Added**\n* `apideck.accounting.paymentMethods.list()`: **Added**\n* `apideck.accounting.paymentMethods.create()`: **Added**\n* `apideck.accounting.paymentMethods.get()`: **Added**\n* `apideck.accounting.paymentMethods.update()`: **Added**\n* `apideck.accounting.paymentMethods.delete()`: **Added**\n* `apideck.accounting.taxRates.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.taxRates.create()`: \n * `request.taxRate.customFields[]` **Changed**\n* `apideck.accounting.taxRates.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.taxRates.update()`: \n * `request.taxRate.customFields[]` **Changed**\n* `apideck.accounting.bills.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.bills.create()`: \n * `request.bill.customFields[]` **Changed**\n* `apideck.accounting.bills.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.bills.update()`: \n * `request.bill.customFields[]` **Changed**\n* `apideck.accounting.invoices.list()`: `response.data[].lineItems[].customFields[]` **Changed**\n* `apideck.accounting.invoices.create()`: \n * `request.invoice.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.invoices.get()`: `response.data.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.invoices.update()`: \n * `request.invoice.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.ledgerAccounts.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.ledgerAccounts.create()`: \n * `request.ledgerAccount.customFields[]` **Changed**\n* `apideck.accounting.ledgerAccounts.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.ledgerAccounts.update()`: \n * `request.ledgerAccount.customFields[]` **Changed**\n* `apideck.accounting.creditNotes.list()`: `response.data[].lineItems[].customFields[]` **Changed**\n* `apideck.accounting.creditNotes.create()`: \n * `request.creditNote.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.creditNotes.get()`: `response.data.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.creditNotes.update()`: \n * `request.creditNote.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.customers.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.customers.create()`: \n * `request.customer.customFields[]` **Changed**\n* `apideck.accounting.customers.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.customers.update()`: \n * `request.customer.customFields[]` **Changed**\n* `apideck.accounting.suppliers.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.suppliers.create()`: \n * `request.supplier.customFields[]` **Changed**\n* `apideck.accounting.suppliers.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.suppliers.update()`: \n * `request.supplier.customFields[]` **Changed**\n* `apideck.accounting.payments.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.payments.create()`: \n * `request.payment.customFields[]` **Changed**\n* `apideck.accounting.payments.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.payments.update()`: \n * `request.payment.customFields[]` **Changed**\n* `apideck.accounting.refunds.list()`: `response.data[]` **Changed**\n* `apideck.accounting.refunds.create()`: \n * `request.refund` **Changed**\n* `apideck.accounting.refunds.get()`: `response.data` **Changed**\n* `apideck.accounting.refunds.update()`: \n * `request.refund` **Changed**\n* `apideck.accounting.companyInfo.get()`: `response.data.defaultSalesTax.customFields[]` **Changed**\n* `apideck.accounting.journalEntries.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.journalEntries.create()`: \n * `request.journalEntry.customFields[]` **Changed**\n* `apideck.accounting.journalEntries.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.journalEntries.update()`: \n * `request.journalEntry.customFields[]` **Changed**\n* `apideck.accounting.generalLedgerTransactions.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.generalLedgerTransactions.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.purchaseOrders.list()`: `response.data[].lineItems[].customFields[]` **Changed**\n* `apideck.accounting.purchaseOrders.create()`: \n * `request.purchaseOrder.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.purchaseOrders.get()`: `response.data.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.purchaseOrders.update()`: \n * `request.purchaseOrder.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.attachments.list()`: `response.data[].fileUrl` **Added**\n* `apideck.accounting.attachments.get()`: `response.data.fileUrl` **Added**\n* `apideck.accounting.attachments.download()`: \n * `request.followRedirects` **Added**\n* `apideck.accounting.bankAccounts.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.bankAccounts.create()`: \n * `request.accountingBankAccount.customFields[]` **Changed**\n* `apideck.accounting.bankAccounts.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.bankAccounts.update()`: \n * `request.accountingBankAccount.customFields[]` **Changed**\n* `apideck.accounting.billPayments.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.billPayments.create()`: \n * `request.billPayment.customFields[]` **Changed**\n* `apideck.accounting.billPayments.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.billPayments.update()`: \n * `request.billPayment.customFields[]` **Changed**\n* `apideck.accounting.expenses.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.expenses.create()`: \n * `request.expense.customFields[]` **Changed**\n* `apideck.accounting.expenses.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.expenses.update()`: \n * `request.expense.customFields[]` **Changed**\n* `apideck.accounting.bankFeedAccounts.list()`: `response.data[]` **Changed**\n* `apideck.accounting.bankFeedAccounts.create()`: \n * `request.bankFeedAccount` **Changed**\n* `apideck.accounting.bankFeedAccounts.get()`: `response.data` **Changed**\n* `apideck.accounting.bankFeedAccounts.update()`: \n * `request.bankFeedAccount` **Changed**\n* `apideck.accounting.bankFeedStatements.list()`: `response.data[].transactions[].merchantCategoryCode` **Added**\n* `apideck.accounting.bankFeedStatements.create()`: \n * `request.bankFeedStatement.transactions[].merchantCategoryCode` **Added**\n* `apideck.accounting.bankFeedStatements.get()`: `response.data.transactions[].merchantCategoryCode` **Added**\n* `apideck.accounting.bankFeedStatements.update()`: \n * `request.bankFeedStatement.transactions[].merchantCategoryCode` **Added**\n* `apideck.accounting.quotes.list()`: `response.data[].lineItems[].customFields[]` **Changed**\n* `apideck.accounting.quotes.create()`: \n * `request.quote.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.quotes.get()`: `response.data.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.quotes.update()`: \n * `request.quote.lineItems[].customFields[]` **Changed**\n* `apideck.accounting.projects.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.projects.create()`: \n * `request.project.customFields[]` **Changed**\n* `apideck.accounting.projects.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.projects.update()`: \n * `request.project.customFields[]` **Changed**\n* `apideck.accounting.employees.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.employees.create()`: \n * `request.accountingEmployee.customFields[]` **Changed**\n* `apideck.accounting.employees.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.employees.update()`: \n * `request.accountingEmployee.customFields[]` **Changed**\n* `apideck.accounting.expenseReports.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.accounting.expenseReports.create()`: \n * `request.expenseReport.customFields[]` **Changed**\n* `apideck.accounting.expenseReports.get()`: `response.data.customFields[]` **Changed**\n* `apideck.accounting.expenseReports.update()`: \n * `request.expenseReport.customFields[]` **Changed**\n* `apideck.ats.jobs.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.ats.jobs.create()`: \n * `request.job.customFields[]` **Changed**\n* `apideck.ats.jobs.get()`: `response.data.customFields[]` **Changed**\n* `apideck.ats.jobs.update()`: \n * `request.job.customFields[]` **Changed**\n* `apideck.ats.applicants.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.ats.applicants.create()`: \n * `request.applicant.customFields[]` **Changed**\n* `apideck.ats.applicants.get()`: `response.data.customFields[]` **Changed**\n* `apideck.ats.applicants.update()`: \n * `request.applicant.customFields[]` **Changed**\n* `apideck.crm.companies.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.crm.companies.create()`: \n * `request.company1.customFields[]` **Changed**\n* `apideck.crm.companies.get()`: `response.data.customFields[]` **Changed**\n* `apideck.crm.companies.update()`: \n * `request.company1.customFields[]` **Changed**\n* `apideck.crm.contacts.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.crm.contacts.create()`: \n * `request.contact.customFields[]` **Changed**\n* `apideck.crm.contacts.get()`: `response.data.customFields[]` **Changed**\n* `apideck.crm.contacts.update()`: \n * `request.contact.customFields[]` **Changed**\n* `apideck.crm.opportunities.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.crm.opportunities.create()`: \n * `request.opportunity.customFields[]` **Changed**\n* `apideck.crm.opportunities.get()`: `response.data.customFields[]` **Changed**\n* `apideck.crm.opportunities.update()`: \n * `request.opportunity.customFields[]` **Changed**\n* `apideck.crm.leads.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.crm.leads.create()`: \n * `request.lead.customFields[]` **Changed**\n* `apideck.crm.leads.get()`: `response.data.customFields[]` **Changed**\n* `apideck.crm.leads.update()`: \n * `request.lead.customFields[]` **Changed**\n* `apideck.crm.lists.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.crm.lists.get()`: `response.data.customFields[]` **Changed**\n* `apideck.crm.activities.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.crm.activities.create()`: \n * `request.activity.customFields[]` **Changed**\n* `apideck.crm.activities.get()`: `response.data.customFields[]` **Changed**\n* `apideck.crm.activities.update()`: \n * `request.activity.customFields[]` **Changed**\n* `apideck.fileStorage.files.download()`: \n * `request.followRedirects` **Added**\n* `apideck.hris.employees.list()`: `response.data[].customFields[]` **Changed**\n* `apideck.hris.employees.create()`: \n * `request.employee.customFields[]` **Changed**\n* `apideck.hris.employees.get()`: `response.data.customFields[]` **Changed**\n* `apideck.hris.employees.update()`: \n * `request.employee.customFields[]` **Changed**\n* `apideck.hris.employeeSchedules.list()`: `response.data.employee.customFields[]` **Changed**\n* `apideck.proxy.get()`: \n * `request.followRedirects` **Added**\n* `apideck.proxy.options()`: \n * `request.followRedirects` **Added**\n* `apideck.proxy.post()`: \n * `request.followRedirects` **Added**\n* `apideck.proxy.put()`: \n * `request.followRedirects` **Added**\n* `apideck.proxy.patch()`: \n * `request.followRedirects` **Added**\n* `apideck.proxy.delete()`: \n * `request.followRedirects` **Added**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e1a66a393..36468c145 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.37.0 + version: 0.38.0 additionalDependencies: [] additionalPlugins: [] artifactID: unify @@ -47,7 +47,7 @@ java: explicitDocImports: false flattenGlobalSecurity: true forwardCompatibleEnumsByDefault: true - forwardCompatibleUnionsByDefault: "false" + forwardCompatibleUnionsByDefault: true generateOptionalUnionAccessors: false generateSpringBootStarter: true generateUnionDocs: false diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d899ebbf4..d4fc40f1d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,20 +1,20 @@ -speakeasyVersion: 1.791.4 +speakeasyVersion: 1.795.0 sources: Apideck-OAS: sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:1c6092eb51bb1bc843fc7faf1a2482c1fa02091833fea4de3ff175f01704badd - sourceBlobDigest: sha256:c0e56ff09e13c899e55da0cdad6f1aab6c5420a5616c5d0f1c023800aac22aee + sourceRevisionDigest: sha256:b500ee93c3e0770cebd4c005afaa686171daec06483f88dc12ae1262292e62ab + sourceBlobDigest: sha256:58903e9b86488dda3025dcf090f1a3d31265683c33d4e44d8ed54ff4119d0e2f tags: - latest - - 10.32.0 + - 10.42.0 targets: apideck: source: Apideck-OAS sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:1c6092eb51bb1bc843fc7faf1a2482c1fa02091833fea4de3ff175f01704badd - sourceBlobDigest: sha256:c0e56ff09e13c899e55da0cdad6f1aab6c5420a5616c5d0f1c023800aac22aee + sourceRevisionDigest: sha256:b500ee93c3e0770cebd4c005afaa686171daec06483f88dc12ae1262292e62ab + sourceBlobDigest: sha256:58903e9b86488dda3025dcf090f1a3d31265683c33d4e44d8ed54ff4119d0e2f codeSamplesNamespace: apideck-oas-java-code-samples - codeSamplesRevisionDigest: sha256:5254e32fe88f90c0138234e9222cf85c3d5f88e9e9ebd8a41bdbb206b566688a + codeSamplesRevisionDigest: sha256:8ff5f8f55e3b0caad84c37c20e926fa8ef222c5c843b7669ae42c501957c9da8 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index de954ac92..5b4440a81 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.apideck:unify:0.37.0' +implementation 'com.apideck:unify:0.38.0' ``` Maven: @@ -59,7 +59,7 @@ Maven: com.apideck unify - 0.37.0 + 0.38.0 ``` @@ -375,6 +375,14 @@ For full model-specific examples (including Java 11/16/21 variants), see each un * [update](docs/sdks/locations/README.md#update) - Update Location * [delete](docs/sdks/locations/README.md#delete) - Delete Location +### [Accounting.PaymentMethods](docs/sdks/paymentmethods/README.md) + +* [list](docs/sdks/paymentmethods/README.md#list) - List 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 + ### [Accounting.Payments](docs/sdks/payments/README.md) * [list](docs/sdks/payments/README.md#list) - List Payments @@ -419,6 +427,14 @@ For full model-specific examples (including Java 11/16/21 variants), see each un * [update](docs/sdks/refunds/README.md#update) - Update Refund * [delete](docs/sdks/refunds/README.md#delete) - Delete Refund +### [Accounting.SalesReceipts](docs/sdks/salesreceipts/README.md) + +* [list](docs/sdks/salesreceipts/README.md#list) - List Sales Receipts +* [create](docs/sdks/salesreceipts/README.md#create) - Create Sales Receipt +* [get](docs/sdks/salesreceipts/README.md#get) - Get Sales Receipt +* [update](docs/sdks/salesreceipts/README.md#update) - Update Sales Receipt +* [delete](docs/sdks/salesreceipts/README.md#delete) - Delete Sales Receipt + ### [Accounting.Subsidiaries](docs/sdks/subsidiaries/README.md) * [list](docs/sdks/subsidiaries/README.md#list) - List Subsidiaries @@ -1200,8 +1216,8 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`ApideckError`](./src/main/java/models/errors/ApideckError.java)**: -* [`com.apideck.unify.models.errors.Unauthorized`](./src/main/java/models/errors/com.apideck.unify.models.errors.Unauthorized.java): Unauthorized. Status code `401`. Applicable to 6 of 340 methods.* -* [`com.apideck.unify.models.errors.ConflictResponse`](./src/main/java/models/errors/com.apideck.unify.models.errors.ConflictResponse.java): Conflict — a connection already exists for the target connector. Status code `409`. Applicable to 1 of 340 methods.* +* [`com.apideck.unify.models.errors.Unauthorized`](./src/main/java/models/errors/com.apideck.unify.models.errors.Unauthorized.java): Unauthorized. Status code `401`. Applicable to 6 of 350 methods.* +* [`com.apideck.unify.models.errors.ConflictResponse`](./src/main/java/models/errors/com.apideck.unify.models.errors.ConflictResponse.java): Conflict — a connection already exists for the target connector. Status code `409`. Applicable to 1 of 350 methods.* diff --git a/RELEASES.md b/RELEASES.md index 55ddbac50..9d161a90d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1098,4 +1098,14 @@ Based on: ### Generated - [java v0.37.0] . ### Releases -- [Maven Central v0.37.0] https://central.sonatype.com/artifact/com.apideck/unify/0.37.0 - . \ No newline at end of file +- [Maven Central v0.37.0] https://central.sonatype.com/artifact/com.apideck/unify/0.37.0 - . + +## 2026-08-20 10:51:38 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.795.0 (2.931.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.38.0] . +### Releases +- [Maven Central v0.38.0] https://central.sonatype.com/artifact/com.apideck/unify/0.38.0 - . \ No newline at end of file diff --git a/docs/models/components/AccountingPaymentMethod.md b/docs/models/components/AccountingPaymentMethod.md new file mode 100644 index 000000000..12b3136c9 --- /dev/null +++ b/docs/models/components/AccountingPaymentMethod.md @@ -0,0 +1,19 @@ +# AccountingPaymentMethod + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the payment method. | Cash | +| `type` | [JsonNullable\](../../models/components/AccountingPaymentMethodType.md) | :heavy_minus_sign: | The type of payment method. | cash | +| `status` | [JsonNullable\](../../models/components/AccountingPaymentMethodStatus.md) | :heavy_minus_sign: | The status of the payment method. | active | +| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `downstreamId` | *JsonNullable\* | :heavy_minus_sign: | The third-party API ID of original entity | 12345 | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/AccountingPaymentMethodInput.md b/docs/models/components/AccountingPaymentMethodInput.md new file mode 100644 index 000000000..7f9a3dd38 --- /dev/null +++ b/docs/models/components/AccountingPaymentMethodInput.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the payment method. | Cash | +| `type` | [JsonNullable\](../../models/components/AccountingPaymentMethodType.md) | :heavy_minus_sign: | The type of payment method. | cash | +| `status` | [JsonNullable\](../../models/components/AccountingPaymentMethodStatus.md) | :heavy_minus_sign: | The status of the payment method. | active | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/AccountingPaymentMethodStatus.md b/docs/models/components/AccountingPaymentMethodStatus.md new file mode 100644 index 000000000..e924caf5d --- /dev/null +++ b/docs/models/components/AccountingPaymentMethodStatus.md @@ -0,0 +1,22 @@ +# AccountingPaymentMethodStatus + +The status of the payment method. + +## Example Usage + +```java +import com.apideck.unify.models.components.AccountingPaymentMethodStatus; + +AccountingPaymentMethodStatus value = AccountingPaymentMethodStatus.ACTIVE; + +// Open enum: use .of() to create instances from custom string values +AccountingPaymentMethodStatus custom = AccountingPaymentMethodStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACTIVE` | active | +| `INACTIVE` | inactive | \ No newline at end of file diff --git a/docs/models/components/AccountingPaymentMethodType.md b/docs/models/components/AccountingPaymentMethodType.md new file mode 100644 index 000000000..697eaec2a --- /dev/null +++ b/docs/models/components/AccountingPaymentMethodType.md @@ -0,0 +1,28 @@ +# AccountingPaymentMethodType + +The type of payment method. + +## Example Usage + +```java +import com.apideck.unify.models.components.AccountingPaymentMethodType; + +AccountingPaymentMethodType value = AccountingPaymentMethodType.CASH; + +// Open enum: use .of() to create instances from custom string values +AccountingPaymentMethodType custom = AccountingPaymentMethodType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `CASH` | cash | +| `CHECK` | check | +| `CREDIT_CARD` | credit_card | +| `DEBIT_CARD` | debit_card | +| `BANK_TRANSFER` | bank_transfer | +| `ELECTRONIC` | electronic | +| `OTHER` | other | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/docs/models/components/Attachment.md b/docs/models/components/Attachment.md index a59dabe55..3d17b9b5a 100644 --- a/docs/models/components/Attachment.md +++ b/docs/models/components/Attachment.md @@ -12,6 +12,7 @@ | `size` | *JsonNullable\* | :heavy_minus_sign: | The size of the file in bytes | 1810673 | | `reference` | [Optional\](../../models/components/AttachmentReference.md) | :heavy_minus_sign: | N/A | | | `description` | *JsonNullable\* | :heavy_minus_sign: | Optional description of the file | A sample image | +| `fileUrl` | *JsonNullable\* | :heavy_minus_sign: | The URL to download or preview the file | https://example.com/files/sample.jpg | | `parentFolderId` | *JsonNullable\* | :heavy_minus_sign: | The folder id where this attachment belong to | 123 | | `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | | `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | diff --git a/docs/models/components/BankFeedAccount.md b/docs/models/components/BankFeedAccount.md index c29b1c37b..5a5d08d5b 100644 --- a/docs/models/components/BankFeedAccount.md +++ b/docs/models/components/BankFeedAccount.md @@ -8,9 +8,13 @@ | `id` | *String* | :heavy_check_mark: | A unique identifier for an object. | 12345 | | `bankAccountType` | [Optional\](../../models/components/BankAccountType.md) | :heavy_minus_sign: | Type of the bank account. | bank | | `sourceAccountId` | *Optional\* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `sourceRoutingNumber` | *JsonNullable\* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `sourceAccountNumber` | *JsonNullable\* | :heavy_minus_sign: | The bank account number | 123465 | | `targetAccountId` | *Optional\* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | | `targetAccountName` | *Optional\* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | | `targetAccountNumber` | *Optional\* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `balance` | *JsonNullable\* | :heavy_minus_sign: | The current balance of the source bank account. | 25000 | +| `availableBalance` | *JsonNullable\* | :heavy_minus_sign: | The available balance of the source bank account (considering pending transactions and overdraft). | 24500 | | `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | | `feedStatus` | [Optional\](../../models/components/FeedStatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | | `country` | *JsonNullable\* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | diff --git a/docs/models/components/BankFeedAccountInput.md b/docs/models/components/BankFeedAccountInput.md index 079c7eafc..77fa87ea4 100644 --- a/docs/models/components/BankFeedAccountInput.md +++ b/docs/models/components/BankFeedAccountInput.md @@ -7,9 +7,13 @@ | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `bankAccountType` | [Optional\](../../models/components/BankAccountType.md) | :heavy_minus_sign: | Type of the bank account. | bank | | `sourceAccountId` | *Optional\* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `sourceRoutingNumber` | *JsonNullable\* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `sourceAccountNumber` | *JsonNullable\* | :heavy_minus_sign: | The bank account number | 123465 | | `targetAccountId` | *Optional\* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | | `targetAccountName` | *Optional\* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | | `targetAccountNumber` | *Optional\* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `balance` | *JsonNullable\* | :heavy_minus_sign: | The current balance of the source bank account. | 25000 | +| `availableBalance` | *JsonNullable\* | :heavy_minus_sign: | The available balance of the source bank account (considering pending transactions and overdraft). | 24500 | | `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | | `feedStatus` | [Optional\](../../models/components/FeedStatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | | `country` | *JsonNullable\* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | diff --git a/docs/models/components/CreatePaymentMethodResponse.md b/docs/models/components/CreatePaymentMethodResponse.md new file mode 100644 index 000000000..53df4f15a --- /dev/null +++ b/docs/models/components/CreatePaymentMethodResponse.md @@ -0,0 +1,16 @@ +# CreatePaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | PaymentMethods | +| `operation` | *String* | :heavy_check_mark: | Operation performed | add | +| `data` | [UnifiedId](../../models/components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/CreateSalesReceiptResponse.md b/docs/models/components/CreateSalesReceiptResponse.md new file mode 100644 index 000000000..9d2203db1 --- /dev/null +++ b/docs/models/components/CreateSalesReceiptResponse.md @@ -0,0 +1,16 @@ +# CreateSalesReceiptResponse + +SalesReceipt created + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | sales-receipts | +| `operation` | *String* | :heavy_check_mark: | Operation performed | add | +| `data` | [UnifiedId](../../models/components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/CustomField1.md b/docs/models/components/CustomField1.md index 8d170144e..7b2ccced7 100644 --- a/docs/models/components/CustomField1.md +++ b/docs/models/components/CustomField1.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_check_mark: | Unique identifier for the custom field. | 2389328923893298 | -| `name` | *JsonNullable\* | :heavy_minus_sign: | Name of the custom field. | employee_level | -| `description` | *JsonNullable\* | :heavy_minus_sign: | More information about the custom field | Employee Level | -| `value` | [JsonNullable\](../../models/components/CustomField1Value.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_check_mark: | Unique identifier for the custom field. | 2389328923893298 | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Name of the custom field. | employee_level | +| `refName` | *JsonNullable\* | :heavy_minus_sign: | Display name of the record a reference-type custom field points at. `value` carries that record's id; this carries its human-readable name, so a consumer does not need a second lookup to render it. | Marketing | +| `description` | *JsonNullable\* | :heavy_minus_sign: | More information about the custom field | Employee Level | +| `value` | [JsonNullable\](../../models/components/CustomField1Value.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/CustomField2.md b/docs/models/components/CustomField2.md index 152af01e6..6120c043b 100644 --- a/docs/models/components/CustomField2.md +++ b/docs/models/components/CustomField2.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `id` | *JsonNullable\* | :heavy_minus_sign: | Unique identifier for the custom field. | 2389328923893298 | -| `name` | *Optional\* | :heavy_check_mark: | Name of the custom field. | employee_level | -| `description` | *JsonNullable\* | :heavy_minus_sign: | More information about the custom field | Employee Level | -| `value` | [JsonNullable\](../../models/components/CustomFieldValue.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *JsonNullable\* | :heavy_minus_sign: | Unique identifier for the custom field. | 2389328923893298 | +| `name` | *Optional\* | :heavy_check_mark: | Name of the custom field. | employee_level | +| `refName` | *JsonNullable\* | :heavy_minus_sign: | Display name of the record a reference-type custom field points at. `value` carries that record's id; this carries its human-readable name, so a consumer does not need a second lookup to render it. | Marketing | +| `description` | *JsonNullable\* | :heavy_minus_sign: | More information about the custom field | Employee Level | +| `value` | [JsonNullable\](../../models/components/CustomFieldValue.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/DeletePaymentMethodResponse.md b/docs/models/components/DeletePaymentMethodResponse.md new file mode 100644 index 000000000..81548eedf --- /dev/null +++ b/docs/models/components/DeletePaymentMethodResponse.md @@ -0,0 +1,16 @@ +# DeletePaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | PaymentMethods | +| `operation` | *String* | :heavy_check_mark: | Operation performed | delete | +| `data` | [UnifiedId](../../models/components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/DeleteSalesReceiptResponse.md b/docs/models/components/DeleteSalesReceiptResponse.md new file mode 100644 index 000000000..999a9ce06 --- /dev/null +++ b/docs/models/components/DeleteSalesReceiptResponse.md @@ -0,0 +1,16 @@ +# DeleteSalesReceiptResponse + +SalesReceipt deleted + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | sales-receipts | +| `operation` | *String* | :heavy_check_mark: | Operation performed | delete | +| `data` | [UnifiedId](../../models/components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/GetPaymentMethodResponse.md b/docs/models/components/GetPaymentMethodResponse.md new file mode 100644 index 000000000..78d54d534 --- /dev/null +++ b/docs/models/components/GetPaymentMethodResponse.md @@ -0,0 +1,17 @@ +# GetPaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | PaymentMethods | +| `operation` | *String* | :heavy_check_mark: | Operation performed | one | +| `data` | [AccountingPaymentMethod](../../models/components/AccountingPaymentMethod.md) | :heavy_check_mark: | N/A | | +| `meta` | [Optional\](../../models/components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/GetPaymentMethodsResponse.md b/docs/models/components/GetPaymentMethodsResponse.md new file mode 100644 index 000000000..e4bf269be --- /dev/null +++ b/docs/models/components/GetPaymentMethodsResponse.md @@ -0,0 +1,18 @@ +# GetPaymentMethodsResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | PaymentMethods | +| `operation` | *String* | :heavy_check_mark: | Operation performed | all | +| `data` | List\<[AccountingPaymentMethod](../../models/components/AccountingPaymentMethod.md)> | :heavy_check_mark: | N/A | | +| `meta` | [Optional\](../../models/components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional\](../../models/components/Links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/GetSalesReceiptResponse.md b/docs/models/components/GetSalesReceiptResponse.md new file mode 100644 index 000000000..e023f1201 --- /dev/null +++ b/docs/models/components/GetSalesReceiptResponse.md @@ -0,0 +1,17 @@ +# GetSalesReceiptResponse + +SalesReceipt + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | sales-receipts | +| `operation` | *String* | :heavy_check_mark: | Operation performed | one | +| `data` | [SalesReceipt](../../models/components/SalesReceipt.md) | :heavy_check_mark: | N/A | | +| `meta` | [Optional\](../../models/components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/GetSalesReceiptsResponse.md b/docs/models/components/GetSalesReceiptsResponse.md new file mode 100644 index 000000000..054765f82 --- /dev/null +++ b/docs/models/components/GetSalesReceiptsResponse.md @@ -0,0 +1,18 @@ +# GetSalesReceiptsResponse + +SalesReceipts + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | sales-receipts | +| `operation` | *String* | :heavy_check_mark: | Operation performed | all | +| `data` | List\<[SalesReceipt](../../models/components/SalesReceipt.md)> | :heavy_check_mark: | N/A | | +| `meta` | [Optional\](../../models/components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional\](../../models/components/Links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/Refund.md b/docs/models/components/Refund.md index 486e84827..840e44d3d 100644 --- a/docs/models/components/Refund.md +++ b/docs/models/components/Refund.md @@ -3,43 +3,43 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | Unique identifier representing the refund | 123456 | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | -| `customer` | [JsonNullable\](../../models/components/LinkedCustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | -| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | -| `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | -| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | -| `refundDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| `status` | [Optional\](../../models/components/RefundStatus.md) | :heavy_minus_sign: | Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state. | paid | -| `type` | [Optional\](../../models/components/RefundType.md) | :heavy_minus_sign: | Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). | refund_receipt | -| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | -| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | -| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | -| `lineItems` | List\<[InvoiceLineItem](../../models/components/InvoiceLineItem.md)> | :heavy_minus_sign: | Line items for itemized refunds (type: refund_receipt). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund. | | -| `allocations` | List\<[Allocation](../../models/components/Allocation.md)> | :heavy_minus_sign: | Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books. | | -| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | -| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | -| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | -| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | -| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | -| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | -| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | -| `department` | [JsonNullable\](../../models/components/LinkedDepartment.md) | :heavy_minus_sign: | N/A | | -| `location` | [JsonNullable\](../../models/components/LinkedLocation.md) | :heavy_minus_sign: | N/A | | -| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | -| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | -| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | Unique identifier representing the refund | 123456 | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `refundDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `status` | [Optional\](../../models/components/RefundStatus.md) | :heavy_minus_sign: | Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state. | paid | +| `type` | [Optional\](../../models/components/RefundType.md) | :heavy_minus_sign: | Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. | refund_receipt | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItem](../../models/components/InvoiceLineItem.md)> | :heavy_minus_sign: | Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund. | | +| `allocations` | List\<[Allocation](../../models/components/Allocation.md)> | :heavy_minus_sign: | Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books. | | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | +| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | +| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [JsonNullable\](../../models/components/LinkedDepartment.md) | :heavy_minus_sign: | N/A | | +| `location` | [JsonNullable\](../../models/components/LinkedLocation.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/RefundInput.md b/docs/models/components/RefundInput.md index 836e4db22..4ec766564 100644 --- a/docs/models/components/RefundInput.md +++ b/docs/models/components/RefundInput.md @@ -3,37 +3,37 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | -| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | -| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | -| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | -| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | -| `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | -| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | -| `refundDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| `status` | [Optional\](../../models/components/RefundStatus.md) | :heavy_minus_sign: | Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state. | paid | -| `type` | [Optional\](../../models/components/RefundType.md) | :heavy_minus_sign: | Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). | refund_receipt | -| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | -| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | -| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | -| `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | Line items for itemized refunds (type: refund_receipt). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund. | | -| `allocations` | List\<[AllocationInput](../../models/components/AllocationInput.md)> | :heavy_minus_sign: | Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books. | | -| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | -| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | -| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | -| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | -| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | -| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | -| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | -| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | -| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | -| `location` | [JsonNullable\](../../models/components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | -| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `refundDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `status` | [Optional\](../../models/components/RefundStatus.md) | :heavy_minus_sign: | Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state. | paid | +| `type` | [Optional\](../../models/components/RefundType.md) | :heavy_minus_sign: | Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. | refund_receipt | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund. | | +| `allocations` | List\<[AllocationInput](../../models/components/AllocationInput.md)> | :heavy_minus_sign: | Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books. | | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | +| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | +| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `location` | [JsonNullable\](../../models/components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/RefundType.md b/docs/models/components/RefundType.md index 46aea90aa..2a61dd345 100644 --- a/docs/models/components/RefundType.md +++ b/docs/models/components/RefundType.md @@ -1,6 +1,6 @@ # RefundType -Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). +Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. ## Example Usage @@ -20,4 +20,5 @@ RefundType custom = RefundType.of("custom_value"); | -------------------- | -------------------- | | `REFUND_RECEIPT` | refund_receipt | | `CASH_REFUND` | cash_refund | -| `CREDIT_NOTE_REFUND` | credit_note_refund | \ No newline at end of file +| `CREDIT_NOTE_REFUND` | credit_note_refund | +| `SALE_REFUND` | sale_refund | \ No newline at end of file diff --git a/docs/models/components/SalesReceipt.md b/docs/models/components/SalesReceipt.md new file mode 100644 index 000000000..e79729489 --- /dev/null +++ b/docs/models/components/SalesReceipt.md @@ -0,0 +1,40 @@ +# SalesReceipt + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | Unique identifier representing the sales receipt | 123456 | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the sales receipt. | SR-00001 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItem](../../models/components/InvoiceLineItem.md)> | :heavy_minus_sign: | Line items for itemized sales receipts. Used when the sales receipt includes product/service details with quantities and pricing. | | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this sales receipt. | 5.5 | +| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this sales receipt. | 25 | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the sales receipt. | Thank you for your purchase | +| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the sales receipt. | REF-123456 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [JsonNullable\](../../models/components/LinkedDepartment.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customMappings` | Map\ | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updatedBy` | *JsonNullable\* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/SalesReceiptInput.md b/docs/models/components/SalesReceiptInput.md new file mode 100644 index 000000000..d6f86003c --- /dev/null +++ b/docs/models/components/SalesReceiptInput.md @@ -0,0 +1,34 @@ +# SalesReceiptInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the sales receipt. | SR-00001 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *Optional\* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | Line items for itemized sales receipts. Used when the sales receipt includes product/service details with quantities and pricing. | | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this sales receipt. | 5.5 | +| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this sales receipt. | 25 | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the sales receipt. | Thank you for your purchase | +| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the sales receipt. | REF-123456 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/SalesReceiptsFilter.md b/docs/models/components/SalesReceiptsFilter.md new file mode 100644 index 000000000..114ffa874 --- /dev/null +++ b/docs/models/components/SalesReceiptsFilter.md @@ -0,0 +1,9 @@ +# SalesReceiptsFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `updatedSince` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | N/A | 2020-09-30T07:43:32.000Z | +| `customerId` | *Optional\* | :heavy_minus_sign: | Filter by customer id | 123abc | \ No newline at end of file diff --git a/docs/models/components/SalesReceiptsSort.md b/docs/models/components/SalesReceiptsSort.md new file mode 100644 index 000000000..0ef099b29 --- /dev/null +++ b/docs/models/components/SalesReceiptsSort.md @@ -0,0 +1,9 @@ +# SalesReceiptsSort + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `by` | [Optional\](../../models/components/SalesReceiptsSortBy.md) | :heavy_minus_sign: | The field on which to sort the Sales Receipts. | updated_at | +| `direction` | [Optional\](../../models/components/SortDirection.md) | :heavy_minus_sign: | The direction in which to sort the results | | \ No newline at end of file diff --git a/docs/models/components/SalesReceiptsSortBy.md b/docs/models/components/SalesReceiptsSortBy.md new file mode 100644 index 000000000..5553eba79 --- /dev/null +++ b/docs/models/components/SalesReceiptsSortBy.md @@ -0,0 +1,22 @@ +# SalesReceiptsSortBy + +The field on which to sort the Sales Receipts. + +## Example Usage + +```java +import com.apideck.unify.models.components.SalesReceiptsSortBy; + +SalesReceiptsSortBy value = SalesReceiptsSortBy.UPDATED_AT; + +// Open enum: use .of() to create instances from custom string values +SalesReceiptsSortBy custom = SalesReceiptsSortBy.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `UPDATED_AT` | updated_at | +| `CREATED_AT` | created_at | \ No newline at end of file diff --git a/docs/models/components/Transactions.md b/docs/models/components/Transactions.md index a08490cab..93c86ba4c 100644 --- a/docs/models/components/Transactions.md +++ b/docs/models/components/Transactions.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `postedDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2025-01-15T12:00:00.000Z | -| `description` | *Optional\* | :heavy_minus_sign: | A description of the transaction. | Payment received from ACME Corp | -| `amount` | *double* | :heavy_check_mark: | The amount of the transaction. | 250 | -| `creditOrDebit` | [CreditOrDebit](../../models/components/CreditOrDebit.md) | :heavy_check_mark: | Whether the amount is a credit or debit. | debit | -| `sourceTransactionId` | *String* | :heavy_check_mark: | The ID of the source transaction. | txn_987 | -| `counterparty` | *Optional\* | :heavy_minus_sign: | The counterparty of the transaction. | ACME Corp | -| `reference` | *Optional\* | :heavy_minus_sign: | The reference of the transaction. | INV-2025-01 | -| `transactionType` | [Optional\](../../models/components/BankFeedStatementTransactionType.md) | :heavy_minus_sign: | Type of transaction. | payment | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `postedDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2025-01-15T12:00:00.000Z | +| `description` | *Optional\* | :heavy_minus_sign: | A description of the transaction. | Payment received from ACME Corp | +| `amount` | *double* | :heavy_check_mark: | The amount of the transaction. | 250 | +| `creditOrDebit` | [CreditOrDebit](../../models/components/CreditOrDebit.md) | :heavy_check_mark: | Whether the amount is a credit or debit. | debit | +| `sourceTransactionId` | *String* | :heavy_check_mark: | The ID of the source transaction. | txn_987 | +| `counterparty` | *Optional\* | :heavy_minus_sign: | The counterparty of the transaction. | ACME Corp | +| `reference` | *Optional\* | :heavy_minus_sign: | The reference of the transaction. | INV-2025-01 | +| `transactionType` | [Optional\](../../models/components/BankFeedStatementTransactionType.md) | :heavy_minus_sign: | Type of transaction. | payment | +| `merchantCategoryCode` | *JsonNullable\* | :heavy_minus_sign: | The ISO 18245 merchant category code (MCC) classifying the merchant for this transaction, expected as a four-digit code such as `5812`. The format is not enforced by the API, matching the other bank identifier fields. | 5812 | \ No newline at end of file diff --git a/docs/models/components/UpdatePaymentMethodResponse.md b/docs/models/components/UpdatePaymentMethodResponse.md new file mode 100644 index 000000000..775d6fb39 --- /dev/null +++ b/docs/models/components/UpdatePaymentMethodResponse.md @@ -0,0 +1,16 @@ +# UpdatePaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | PaymentMethods | +| `operation` | *String* | :heavy_check_mark: | Operation performed | update | +| `data` | [UnifiedId](../../models/components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/components/UpdateSalesReceiptResponse.md b/docs/models/components/UpdateSalesReceiptResponse.md new file mode 100644 index 000000000..aa4b76cff --- /dev/null +++ b/docs/models/components/UpdateSalesReceiptResponse.md @@ -0,0 +1,16 @@ +# UpdateSalesReceiptResponse + +SalesReceipt updated + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *long* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *String* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *String* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *String* | :heavy_check_mark: | Unified API resource name | sales-receipts | +| `operation` | *String* | :heavy_check_mark: | Operation performed | update | +| `data` | [UnifiedId](../../models/components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Map\ | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/operations/AccountingAttachmentsDownloadRequest.md b/docs/models/operations/AccountingAttachmentsDownloadRequest.md index 6b7fb6016..83c8a7a2f 100644 --- a/docs/models/operations/AccountingAttachmentsDownloadRequest.md +++ b/docs/models/operations/AccountingAttachmentsDownloadRequest.md @@ -12,4 +12,5 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | -| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file +| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | \ No newline at end of file diff --git a/docs/models/operations/AccountingAttachmentsDownloadResponse.md b/docs/models/operations/AccountingAttachmentsDownloadResponse.md index 3a431e3c2..ed64b29e7 100644 --- a/docs/models/operations/AccountingAttachmentsDownloadResponse.md +++ b/docs/models/operations/AccountingAttachmentsDownloadResponse.md @@ -3,10 +3,10 @@ ## 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 | -| `getAttachmentDownloadResponse` | *Optional\* | :heavy_minus_sign: | Attachment Download | -| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file +| 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 | +| `getAttachmentDownloadResponse` | *Optional\* | :heavy_minus_sign: | Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download would otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the attachment. | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsAddRequest.md b/docs/models/operations/AccountingPaymentMethodsAddRequest.md new file mode 100644 index 000000000..2f82b2ca1 --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsAddRequest.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `accountingPaymentMethod` | [AccountingPaymentMethodInput](../../models/components/AccountingPaymentMethodInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsAddResponse.md b/docs/models/operations/AccountingPaymentMethodsAddResponse.md new file mode 100644 index 000000000..b468d938c --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsAddResponse.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsAddResponse + + +## 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 | +| `createPaymentMethodResponse` | [Optional\](../../models/components/CreatePaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsAllRequest.md b/docs/models/operations/AccountingPaymentMethodsAllRequest.md new file mode 100644 index 000000000..c743e6692 --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsAllRequest.md @@ -0,0 +1,15 @@ +# AccountingPaymentMethodsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *JsonNullable\* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional\* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `passThrough` | Map\ | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsAllResponse.md b/docs/models/operations/AccountingPaymentMethodsAllResponse.md new file mode 100644 index 000000000..de23b8f5c --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsAllResponse.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsAllResponse + + +## 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 | +| `getPaymentMethodsResponse` | [Optional\](../../models/components/GetPaymentMethodsResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsDeleteRequest.md b/docs/models/operations/AccountingPaymentMethodsDeleteRequest.md new file mode 100644 index 000000000..cf2a5df82 --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsDeleteRequest.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsDeleteResponse.md b/docs/models/operations/AccountingPaymentMethodsDeleteResponse.md new file mode 100644 index 000000000..8c25a633c --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsDeleteResponse.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsDeleteResponse + + +## 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 | +| `deletePaymentMethodResponse` | [Optional\](../../models/components/DeletePaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsOneRequest.md b/docs/models/operations/AccountingPaymentMethodsOneRequest.md new file mode 100644 index 000000000..3e130d809 --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsOneRequest.md @@ -0,0 +1,13 @@ +# AccountingPaymentMethodsOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsOneResponse.md b/docs/models/operations/AccountingPaymentMethodsOneResponse.md new file mode 100644 index 000000000..4fae5be6b --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsOneResponse.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsOneResponse + + +## 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 | +| `getPaymentMethodResponse` | [Optional\](../../models/components/GetPaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsUpdateRequest.md b/docs/models/operations/AccountingPaymentMethodsUpdateRequest.md new file mode 100644 index 000000000..96466274f --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsUpdateRequest.md @@ -0,0 +1,13 @@ +# AccountingPaymentMethodsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `accountingPaymentMethod` | [AccountingPaymentMethodInput](../../models/components/AccountingPaymentMethodInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentMethodsUpdateResponse.md b/docs/models/operations/AccountingPaymentMethodsUpdateResponse.md new file mode 100644 index 000000000..766467ab5 --- /dev/null +++ b/docs/models/operations/AccountingPaymentMethodsUpdateResponse.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsUpdateResponse + + +## 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 | +| `updatePaymentMethodResponse` | [Optional\](../../models/components/UpdatePaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsAddRequest.md b/docs/models/operations/AccountingSalesReceiptsAddRequest.md new file mode 100644 index 000000000..a8bd66d1d --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsAddRequest.md @@ -0,0 +1,13 @@ +# AccountingSalesReceiptsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | +| `salesReceipt` | [SalesReceiptInput](../../models/components/SalesReceiptInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsAddResponse.md b/docs/models/operations/AccountingSalesReceiptsAddResponse.md new file mode 100644 index 000000000..f121b5848 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsAddResponse.md @@ -0,0 +1,12 @@ +# AccountingSalesReceiptsAddResponse + + +## 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 | +| `createSalesReceiptResponse` | [Optional\](../../models/components/CreateSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt created | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsAllRequest.md b/docs/models/operations/AccountingSalesReceiptsAllRequest.md new file mode 100644 index 000000000..0899353d6 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsAllRequest.md @@ -0,0 +1,18 @@ +# AccountingSalesReceiptsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | +| `cursor` | *JsonNullable\* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional\* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `filter` | [Optional\](../../models/components/SalesReceiptsFilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"customer_id": "123abc"
} | +| `sort` | [Optional\](../../models/components/SalesReceiptsSort.md) | :heavy_minus_sign: | Apply sorting | {
"by": "updated_at",
"direction": "desc"
} | +| `passThrough` | Map\ | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsAllResponse.md b/docs/models/operations/AccountingSalesReceiptsAllResponse.md new file mode 100644 index 000000000..45b9de259 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsAllResponse.md @@ -0,0 +1,12 @@ +# AccountingSalesReceiptsAllResponse + + +## 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 | +| `getSalesReceiptsResponse` | [Optional\](../../models/components/GetSalesReceiptsResponse.md) | :heavy_minus_sign: | SalesReceipts | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsDeleteRequest.md b/docs/models/operations/AccountingSalesReceiptsDeleteRequest.md new file mode 100644 index 000000000..30fb82abd --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsDeleteRequest.md @@ -0,0 +1,13 @@ +# AccountingSalesReceiptsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *String* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsDeleteResponse.md b/docs/models/operations/AccountingSalesReceiptsDeleteResponse.md new file mode 100644 index 000000000..770f283c1 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsDeleteResponse.md @@ -0,0 +1,12 @@ +# AccountingSalesReceiptsDeleteResponse + + +## 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 | +| `deleteSalesReceiptResponse` | [Optional\](../../models/components/DeleteSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt deleted | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsOneRequest.md b/docs/models/operations/AccountingSalesReceiptsOneRequest.md new file mode 100644 index 000000000..acd498692 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsOneRequest.md @@ -0,0 +1,14 @@ +# AccountingSalesReceiptsOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsOneResponse.md b/docs/models/operations/AccountingSalesReceiptsOneResponse.md new file mode 100644 index 000000000..ca060c4d9 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsOneResponse.md @@ -0,0 +1,12 @@ +# AccountingSalesReceiptsOneResponse + + +## 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 | +| `getSalesReceiptResponse` | [Optional\](../../models/components/GetSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md b/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md new file mode 100644 index 000000000..d665b34ed --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md @@ -0,0 +1,14 @@ +# AccountingSalesReceiptsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *String* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | +| `salesReceipt` | [SalesReceiptInput](../../models/components/SalesReceiptInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsUpdateResponse.md b/docs/models/operations/AccountingSalesReceiptsUpdateResponse.md new file mode 100644 index 000000000..4d0e3bcc7 --- /dev/null +++ b/docs/models/operations/AccountingSalesReceiptsUpdateResponse.md @@ -0,0 +1,12 @@ +# AccountingSalesReceiptsUpdateResponse + + +## 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 | +| `updateSalesReceiptResponse` | [Optional\](../../models/components/UpdateSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt updated | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/FileStorageFilesDownloadRequest.md b/docs/models/operations/FileStorageFilesDownloadRequest.md index 3798bc2e9..5b59926c5 100644 --- a/docs/models/operations/FileStorageFilesDownloadRequest.md +++ b/docs/models/operations/FileStorageFilesDownloadRequest.md @@ -9,4 +9,5 @@ | `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | -| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file +| `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | \ No newline at end of file diff --git a/docs/models/operations/FileStorageFilesDownloadResponse.md b/docs/models/operations/FileStorageFilesDownloadResponse.md index c3ce5aa3a..8590c2ad3 100644 --- a/docs/models/operations/FileStorageFilesDownloadResponse.md +++ b/docs/models/operations/FileStorageFilesDownloadResponse.md @@ -3,10 +3,10 @@ ## 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 | -| `getFileDownloadResponse` | *Optional\* | :heavy_minus_sign: | File Download | -| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file +| 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 | +| `getFileDownloadResponse` | *Optional\* | :heavy_minus_sign: | File Download. When the request includes `x-apideck-follow-redirects: false` and the download would otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/FileStorageFilesExportResponse.md b/docs/models/operations/FileStorageFilesExportResponse.md index 7566f8491..e317277ca 100644 --- a/docs/models/operations/FileStorageFilesExportResponse.md +++ b/docs/models/operations/FileStorageFilesExportResponse.md @@ -3,10 +3,10 @@ ## 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 | -| `getFileDownloadResponse` | *Optional\* | :heavy_minus_sign: | File Download | -| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file +| 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 | +| `getFileDownloadResponse` | *Optional\* | :heavy_minus_sign: | File Download. When the request includes `x-apideck-follow-redirects: false` and the download would otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. | +| `unexpectedErrorResponse` | [Optional\](../../models/components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/operations/ProxyDeleteProxyRequest.md b/docs/models/operations/ProxyDeleteProxyRequest.md index 4f76e1b3f..05dc3d712 100644 --- a/docs/models/operations/ProxyDeleteProxyRequest.md +++ b/docs/models/operations/ProxyDeleteProxyRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | -| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | -| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | -| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | +| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | +| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | +| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | \ No newline at end of file diff --git a/docs/models/operations/ProxyDeleteProxyResponse.md b/docs/models/operations/ProxyDeleteProxyResponse.md index 4e7404661..4b51baf98 100644 --- a/docs/models/operations/ProxyDeleteProxyResponse.md +++ b/docs/models/operations/ProxyDeleteProxyResponse.md @@ -3,19 +3,19 @@ ## 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 | -| `responseJson` | Map\ | :heavy_minus_sign: | Ok | -| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok | -| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseText` | *Optional\* | :heavy_minus_sign: | Ok | -| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | -| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file +| 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 | +| `responseJson` | Map\ | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseText` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | +| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ProxyGetProxyRequest.md b/docs/models/operations/ProxyGetProxyRequest.md index 1ed805b62..380e268a1 100644 --- a/docs/models/operations/ProxyGetProxyRequest.md +++ b/docs/models/operations/ProxyGetProxyRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | -| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | -| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | -| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | +| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | +| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | +| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | \ No newline at end of file diff --git a/docs/models/operations/ProxyGetProxyResponse.md b/docs/models/operations/ProxyGetProxyResponse.md index 0e82fb849..d9fb9e8e7 100644 --- a/docs/models/operations/ProxyGetProxyResponse.md +++ b/docs/models/operations/ProxyGetProxyResponse.md @@ -3,19 +3,19 @@ ## 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 | -| `responseJson` | Map\ | :heavy_minus_sign: | Ok | -| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok | -| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseText` | *Optional\* | :heavy_minus_sign: | Ok | -| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | -| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file +| 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 | +| `responseJson` | Map\ | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseText` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | +| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ProxyOptionsProxyRequest.md b/docs/models/operations/ProxyOptionsProxyRequest.md index 949ed951a..de1dfea23 100644 --- a/docs/models/operations/ProxyOptionsProxyRequest.md +++ b/docs/models/operations/ProxyOptionsProxyRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | -| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | -| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | -| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | +| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | +| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | +| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | \ No newline at end of file diff --git a/docs/models/operations/ProxyOptionsProxyResponse.md b/docs/models/operations/ProxyOptionsProxyResponse.md index cf01fd066..f28aba784 100644 --- a/docs/models/operations/ProxyOptionsProxyResponse.md +++ b/docs/models/operations/ProxyOptionsProxyResponse.md @@ -3,19 +3,19 @@ ## 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 | -| `responseJson` | Map\ | :heavy_minus_sign: | Ok | -| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok | -| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseText` | *Optional\* | :heavy_minus_sign: | Ok | -| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | -| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file +| 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 | +| `responseJson` | Map\ | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseText` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | +| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ProxyPatchProxyRequest.md b/docs/models/operations/ProxyPatchProxyRequest.md index 7f87205dc..1d2a9b4e7 100644 --- a/docs/models/operations/ProxyPatchProxyRequest.md +++ b/docs/models/operations/ProxyPatchProxyRequest.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | -| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | -| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | -| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | -| `requestBody` | byte[] | :heavy_minus_sign: | Depending on the verb/method of the request this will contain the request body you want to POST/PATCH/PUT. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | +| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | +| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | +| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | +| `requestBody` | byte[] | :heavy_minus_sign: | Depending on the verb/method of the request this will contain the request body you want to POST/PATCH/PUT. | | \ No newline at end of file diff --git a/docs/models/operations/ProxyPatchProxyResponse.md b/docs/models/operations/ProxyPatchProxyResponse.md index 6fd742702..1afa6ec7e 100644 --- a/docs/models/operations/ProxyPatchProxyResponse.md +++ b/docs/models/operations/ProxyPatchProxyResponse.md @@ -3,19 +3,19 @@ ## 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 | -| `responseJson` | Map\ | :heavy_minus_sign: | Ok | -| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok | -| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseText` | *Optional\* | :heavy_minus_sign: | Ok | -| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | -| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file +| 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 | +| `responseJson` | Map\ | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseText` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | +| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ProxyPostProxyRequest.md b/docs/models/operations/ProxyPostProxyRequest.md index 1ffc9b0c8..d144b1ab3 100644 --- a/docs/models/operations/ProxyPostProxyRequest.md +++ b/docs/models/operations/ProxyPostProxyRequest.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | -| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | -| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | -| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | -| `requestBody` | byte[] | :heavy_minus_sign: | Depending on the verb/method of the request this will contain the request body you want to POST/PATCH/PUT. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | +| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | +| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | +| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | +| `requestBody` | byte[] | :heavy_minus_sign: | Depending on the verb/method of the request this will contain the request body you want to POST/PATCH/PUT. | | \ No newline at end of file diff --git a/docs/models/operations/ProxyPostProxyResponse.md b/docs/models/operations/ProxyPostProxyResponse.md index e83aa50d6..2a71f2566 100644 --- a/docs/models/operations/ProxyPostProxyResponse.md +++ b/docs/models/operations/ProxyPostProxyResponse.md @@ -3,19 +3,19 @@ ## 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 | -| `responseJson` | Map\ | :heavy_minus_sign: | Ok | -| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok | -| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseText` | *Optional\* | :heavy_minus_sign: | Ok | -| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | -| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file +| 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 | +| `responseJson` | Map\ | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseText` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | +| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/ProxyPutProxyRequest.md b/docs/models/operations/ProxyPutProxyRequest.md index d25a0c0b9..7bbfab9df 100644 --- a/docs/models/operations/ProxyPutProxyRequest.md +++ b/docs/models/operations/ProxyPutProxyRequest.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | -| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | -| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | -| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | -| `requestBody` | byte[] | :heavy_minus_sign: | Depending on the verb/method of the request this will contain the request body you want to POST/PATCH/PUT. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *String* | :heavy_check_mark: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | close | +| `unifiedApi` | *Optional\* | :heavy_minus_sign: | Specify which unified API to use for the connection lookup. Required for multi-API connectors (e.g., Workday) to ensure the correct credentials are used. | hris | +| `downstreamUrl` | *String* | :heavy_check_mark: | Downstream URL | https://api.close.com/api/v1/lead | +| `downstreamAuthorization` | *Optional\* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *Optional\* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *Optional\* | :heavy_minus_sign: | Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` header onto redirects, since the downstream storage provider will reject that request. Any value other than `false` (or omitting the header) preserves the default redirect behavior. | false | +| `requestBody` | byte[] | :heavy_minus_sign: | Depending on the verb/method of the request this will contain the request body you want to POST/PATCH/PUT. | | \ No newline at end of file diff --git a/docs/models/operations/ProxyPutProxyResponse.md b/docs/models/operations/ProxyPutProxyResponse.md index 53e6bf406..4982f082e 100644 --- a/docs/models/operations/ProxyPutProxyResponse.md +++ b/docs/models/operations/ProxyPutProxyResponse.md @@ -3,19 +3,19 @@ ## 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 | -| `responseJson` | Map\ | :heavy_minus_sign: | Ok | -| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok | -| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok | -| `responseText` | *Optional\* | :heavy_minus_sign: | Ok | -| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | -| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | -| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file +| 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 | +| `responseJson` | Map\ | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseBinary` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responsePdf` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseXml` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseCsv` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `responseText` | *Optional\* | :heavy_minus_sign: | Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. | +| `errorJson` | Map\ | :heavy_minus_sign: | Proxy error | +| `errorXml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `errorText` | *Optional\* | :heavy_minus_sign: | Proxy error | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/attachments/README.md b/docs/sdks/attachments/README.md index 27c5b8fb7..793a2b109 100644 --- a/docs/sdks/attachments/README.md +++ b/docs/sdks/attachments/README.md @@ -314,6 +314,7 @@ public class Application { .serviceId("salesforce") .companyId("12345") .fields("id,updated_at") + .followRedirects(false) .build(); AccountingAttachmentsDownloadResponse res = sdk.accounting().attachments().download() diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index 035f78d7e..e76336a8d 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -403,6 +403,7 @@ public class Application { .id("") .serviceId("salesforce") .fields("id,updated_at") + .followRedirects(false) .build(); FileStorageFilesDownloadResponse res = sdk.fileStorage().files().download() diff --git a/docs/sdks/paymentmethods/README.md b/docs/sdks/paymentmethods/README.md new file mode 100644 index 000000000..29c0580e5 --- /dev/null +++ b/docs/sdks/paymentmethods/README.md @@ -0,0 +1,369 @@ +# Accounting.PaymentMethods + +## Overview + +### Available Operations + +* [list](#list) - List Payment Methods +* [create](#create) - Create Payment Method +* [get](#get) - Get Payment Method +* [update](#update) - Update Payment Method +* [delete](#delete) - Delete Payment Method + +## list + +List Payment Methods + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllResponse; +import java.lang.Exception; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingPaymentMethodsAllRequest req = AccountingPaymentMethodsAllRequest.builder() + .serviceId("salesforce") + .fields("id,updated_at") + .passThrough(Map.ofEntries( + Map.entry("search", "San Francisco"))) + .build(); + + + sdk.accounting().paymentMethods().list() + .callAsStream() + .forEach((AccountingPaymentMethodsAllResponse item) -> { + // handle page + }); + + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [AccountingPaymentMethodsAllRequest](../../models/operations/AccountingPaymentMethodsAllRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingPaymentMethodsAllResponse](../../models/operations/AccountingPaymentMethodsAllResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## create + +Create Payment Method + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.components.*; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddResponse; +import java.lang.Exception; +import java.util.List; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingPaymentMethodsAddRequest req = AccountingPaymentMethodsAddRequest.builder() + .accountingPaymentMethod(AccountingPaymentMethodInput.builder() + .name("Cash") + .type(AccountingPaymentMethodType.CASH) + .status(AccountingPaymentMethodStatus.ACTIVE) + .rowVersion("1-12345") + .passThrough(List.of( + PassThroughBody.builder() + .serviceId("") + .extendPaths(List.of( + ExtendPaths.builder() + .path("$.nested.property") + .value(Map.ofEntries( + Map.entry("TaxClassificationRef", Map.ofEntries( + Map.entry("value", "EUC-99990201-V1-00020000"))))) + .build())) + .build())) + .build()) + .serviceId("salesforce") + .build(); + + AccountingPaymentMethodsAddResponse res = sdk.accounting().paymentMethods().create() + .request(req) + .call(); + + if (res.createPaymentMethodResponse().isPresent()) { + System.out.println(res.createPaymentMethodResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [AccountingPaymentMethodsAddRequest](../../models/operations/AccountingPaymentMethodsAddRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingPaymentMethodsAddResponse](../../models/operations/AccountingPaymentMethodsAddResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## get + +Get Payment Method + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingPaymentMethodsOneRequest req = AccountingPaymentMethodsOneRequest.builder() + .id("") + .serviceId("salesforce") + .fields("id,updated_at") + .build(); + + AccountingPaymentMethodsOneResponse res = sdk.accounting().paymentMethods().get() + .request(req) + .call(); + + if (res.getPaymentMethodResponse().isPresent()) { + System.out.println(res.getPaymentMethodResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `request` | [AccountingPaymentMethodsOneRequest](../../models/operations/AccountingPaymentMethodsOneRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingPaymentMethodsOneResponse](../../models/operations/AccountingPaymentMethodsOneResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## update + +Update Payment Method + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.components.*; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateResponse; +import java.lang.Exception; +import java.util.List; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingPaymentMethodsUpdateRequest req = AccountingPaymentMethodsUpdateRequest.builder() + .id("") + .accountingPaymentMethod(AccountingPaymentMethodInput.builder() + .name("Cash") + .type(AccountingPaymentMethodType.CASH) + .status(AccountingPaymentMethodStatus.ACTIVE) + .rowVersion("1-12345") + .passThrough(List.of( + PassThroughBody.builder() + .serviceId("") + .extendPaths(List.of( + ExtendPaths.builder() + .path("$.nested.property") + .value(Map.ofEntries( + Map.entry("TaxClassificationRef", Map.ofEntries( + Map.entry("value", "EUC-99990201-V1-00020000"))))) + .build())) + .build())) + .build()) + .serviceId("salesforce") + .build(); + + AccountingPaymentMethodsUpdateResponse res = sdk.accounting().paymentMethods().update() + .request(req) + .call(); + + if (res.updatePaymentMethodResponse().isPresent()) { + System.out.println(res.updatePaymentMethodResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [AccountingPaymentMethodsUpdateRequest](../../models/operations/AccountingPaymentMethodsUpdateRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingPaymentMethodsUpdateResponse](../../models/operations/AccountingPaymentMethodsUpdateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## delete + +Delete Payment Method + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingPaymentMethodsDeleteRequest req = AccountingPaymentMethodsDeleteRequest.builder() + .id("") + .serviceId("salesforce") + .build(); + + AccountingPaymentMethodsDeleteResponse res = sdk.accounting().paymentMethods().delete() + .request(req) + .call(); + + if (res.deletePaymentMethodResponse().isPresent()) { + System.out.println(res.deletePaymentMethodResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [AccountingPaymentMethodsDeleteRequest](../../models/operations/AccountingPaymentMethodsDeleteRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingPaymentMethodsDeleteResponse](../../models/operations/AccountingPaymentMethodsDeleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/proxy/README.md b/docs/sdks/proxy/README.md index bbfb2d6e7..c050df0f3 100644 --- a/docs/sdks/proxy/README.md +++ b/docs/sdks/proxy/README.md @@ -45,6 +45,7 @@ public class Application { .unifiedApi("hris") .downstreamAuthorization("Bearer ") .timeout(30000L) + .followRedirects(false) .build(); ProxyGetProxyResponse res = sdk.proxy().get() @@ -109,6 +110,7 @@ public class Application { .unifiedApi("hris") .downstreamAuthorization("Bearer ") .timeout(30000L) + .followRedirects(false) .build(); ProxyOptionsProxyResponse res = sdk.proxy().options() @@ -173,6 +175,7 @@ public class Application { .unifiedApi("hris") .downstreamAuthorization("Bearer ") .timeout(30000L) + .followRedirects(false) .build(); ProxyPostProxyResponse res = sdk.proxy().post() @@ -234,6 +237,7 @@ public class Application { .unifiedApi("hris") .downstreamAuthorization("Bearer ") .timeout(30000L) + .followRedirects(false) .build(); ProxyPutProxyResponse res = sdk.proxy().put() @@ -295,6 +299,7 @@ public class Application { .unifiedApi("hris") .downstreamAuthorization("Bearer ") .timeout(30000L) + .followRedirects(false) .build(); ProxyPatchProxyResponse res = sdk.proxy().patch() @@ -356,6 +361,7 @@ public class Application { .unifiedApi("hris") .downstreamAuthorization("Bearer ") .timeout(30000L) + .followRedirects(false) .build(); ProxyDeleteProxyResponse res = sdk.proxy().delete() diff --git a/docs/sdks/salesreceipts/README.md b/docs/sdks/salesreceipts/README.md new file mode 100644 index 000000000..ea184c2f3 --- /dev/null +++ b/docs/sdks/salesreceipts/README.md @@ -0,0 +1,724 @@ +# Accounting.SalesReceipts + +## Overview + +### Available Operations + +* [list](#list) - List Sales Receipts +* [create](#create) - Create Sales Receipt +* [get](#get) - Get Sales Receipt +* [update](#update) - Update Sales Receipt +* [delete](#delete) - Delete Sales Receipt + +## list + +List Sales Receipts + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.components.*; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllResponse; +import java.lang.Exception; +import java.time.OffsetDateTime; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingSalesReceiptsAllRequest req = AccountingSalesReceiptsAllRequest.builder() + .serviceId("salesforce") + .companyId("12345") + .filter(SalesReceiptsFilter.builder() + .updatedSince(OffsetDateTime.parse("2020-09-30T07:43:32.000Z")) + .customerId("123abc") + .build()) + .sort(SalesReceiptsSort.builder() + .by(SalesReceiptsSortBy.UPDATED_AT) + .direction(SortDirection.DESC) + .build()) + .passThrough(Map.ofEntries( + Map.entry("search", "San Francisco"))) + .fields("id,updated_at") + .build(); + + + sdk.accounting().salesReceipts().list() + .callAsStream() + .forEach((AccountingSalesReceiptsAllResponse item) -> { + // handle page + }); + + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [AccountingSalesReceiptsAllRequest](../../models/operations/AccountingSalesReceiptsAllRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingSalesReceiptsAllResponse](../../models/operations/AccountingSalesReceiptsAllResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## create + +Create Sales Receipt + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.components.*; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddResponse; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingSalesReceiptsAddRequest req = AccountingSalesReceiptsAddRequest.builder() + .salesReceipt(SalesReceiptInput.builder() + .totalAmount(49.99) + .number("SR-00001") + .customer(LinkedCustomerInput.builder() + .id("12345") + .displayName("Windsurf Shop") + .email("boring@boring.com") + .build()) + .currency(Currency.USD) + .currencyRate(0.69) + .taxInclusive(true) + .subTotal(250d) + .totalTax(25d) + .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) + .paymentMethod("cash") + .paymentMethodReference("123456") + .paymentMethodId("12345") + .account(LinkedLedgerAccount.builder() + .id("123456") + .name("Bank account") + .nominalCode("N091") + .code("453") + .parentId("123456") + .displayId("123456") + .build()) + .lineItems(List.of( + InvoiceLineItemInput.builder() + .id("12345") + .rowId("12345") + .code("120-C") + .lineNumber(1L) + .description("Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.") + .type(InvoiceLineItemType.SALES_ITEM) + .taxAmount(27500d) + .totalAmount(27500d) + .quantity(1d) + .unitPrice(27500.5) + .unitOfMeasure("pc.") + .discountPercentage(0.01) + .discountAmount(19.99) + .serviceDate(LocalDate.parse("2024-01-15")) + .categoryId("12345") + .locationId("12345") + .departmentId("12345") + .subsidiaryId("12345") + .shippingId("12345") + .memo("Some memo") + .prepaid(true) + .item(LinkedInvoiceItem.builder() + .id("12344") + .code("120-C") + .name("Model Y") + .build()) + .taxApplicableOn("Domestic_Purchase_of_Goods_and_Services") + .taxRecoverability("Fully_Recoverable") + .taxMethod("Due_to_Supplier") + .worktags(List.of( + LinkedWorktag.builder() + .id("123456") + .value("New York") + .build())) + .taxRate(LinkedTaxRateInput.builder() + .id("123456") + .code("N-T") + .rate(10d) + .build()) + .trackingCategories(List.of( + LinkedTrackingCategory.builder() + .id("123456") + .code("100") + .name("New York") + .parentId("123456") + .parentName("New York") + .build())) + .ledgerAccount(LinkedLedgerAccount.builder() + .id("123456") + .name("Bank account") + .nominalCode("N091") + .code("453") + .parentId("123456") + .displayId("123456") + .build()) + .customFields(List.of( + CustomField.of(CustomField1.builder() + .id("2389328923893298") + .name("employee_level") + .refName("Marketing") + .description("Employee Level") + .value(CustomField1Value.of("Uses Salesforce and Marketo")) + .build()))) + .rowVersion("1-12345") + .build())) + .taxCode("1234") + .discountPercentage(5.5) + .discountAmount(25d) + .note("Thank you for your purchase") + .customerMemo("Thank you for your business and have a great day!") + .reference("REF-123456") + .billingAddress(Address.builder() + .id("123") + .type(Type.PRIMARY) + .string("25 Spring Street, Blackburn, VIC 3130") + .name("HQ US") + .line1("Main street") + .line2("apt #") + .line3("Suite #") + .line4("delivery instructions") + .line5("Attention: Finance Dept") + .streetNumber("25") + .city("San Francisco") + .state("CA") + .postalCode("94104") + .country("US") + .latitude("40.759211") + .longitude("-73.984638") + .county("Santa Clara") + .contactName("Elon Musk") + .salutation("Mr") + .phoneNumber("111-111-1111") + .fax("122-111-1111") + .email("elon@musk.com") + .website("https://elonmusk.com") + .notes("Address notes or delivery instructions.") + .rowVersion("1-12345") + .build()) + .shippingAddress(Address.builder() + .id("123") + .type(Type.PRIMARY) + .string("25 Spring Street, Blackburn, VIC 3130") + .name("HQ US") + .line1("Main street") + .line2("apt #") + .line3("Suite #") + .line4("delivery instructions") + .line5("Attention: Finance Dept") + .streetNumber("25") + .city("San Francisco") + .state("CA") + .postalCode("94104") + .country("US") + .latitude("40.759211") + .longitude("-73.984638") + .county("Santa Clara") + .contactName("Elon Musk") + .salutation("Mr") + .phoneNumber("111-111-1111") + .fax("122-111-1111") + .email("elon@musk.com") + .website("https://elonmusk.com") + .notes("Address notes or delivery instructions.") + .rowVersion("1-12345") + .build()) + .department(LinkedDepartmentInput.builder() + .displayId("123456") + .name("Acme Inc.") + .build()) + .trackingCategories(List.of( + LinkedTrackingCategory.builder() + .id("123456") + .code("100") + .name("New York") + .parentId("123456") + .parentName("New York") + .build())) + .customFields(List.of( + CustomField.of(CustomField1.builder() + .id("2389328923893298") + .name("employee_level") + .refName("Marketing") + .description("Employee Level") + .value(CustomField1Value.of("Uses Salesforce and Marketo")) + .build()))) + .rowVersion("1-12345") + .passThrough(List.of( + PassThroughBody.builder() + .serviceId("") + .extendPaths(List.of( + ExtendPaths.builder() + .path("$.nested.property") + .value(Map.ofEntries( + Map.entry("TaxClassificationRef", Map.ofEntries( + Map.entry("value", "EUC-99990201-V1-00020000"))))) + .build())) + .build())) + .build()) + .serviceId("salesforce") + .companyId("12345") + .build(); + + AccountingSalesReceiptsAddResponse res = sdk.accounting().salesReceipts().create() + .request(req) + .call(); + + if (res.createSalesReceiptResponse().isPresent()) { + System.out.println(res.createSalesReceiptResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [AccountingSalesReceiptsAddRequest](../../models/operations/AccountingSalesReceiptsAddRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingSalesReceiptsAddResponse](../../models/operations/AccountingSalesReceiptsAddResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## get + +Get Sales Receipt + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingSalesReceiptsOneRequest req = AccountingSalesReceiptsOneRequest.builder() + .id("") + .serviceId("salesforce") + .companyId("12345") + .fields("id,updated_at") + .build(); + + AccountingSalesReceiptsOneResponse res = sdk.accounting().salesReceipts().get() + .request(req) + .call(); + + if (res.getSalesReceiptResponse().isPresent()) { + System.out.println(res.getSalesReceiptResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [AccountingSalesReceiptsOneRequest](../../models/operations/AccountingSalesReceiptsOneRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingSalesReceiptsOneResponse](../../models/operations/AccountingSalesReceiptsOneResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## update + +Update Sales Receipt + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.components.*; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateResponse; +import java.lang.Exception; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingSalesReceiptsUpdateRequest req = AccountingSalesReceiptsUpdateRequest.builder() + .id("") + .salesReceipt(SalesReceiptInput.builder() + .totalAmount(49.99) + .number("SR-00001") + .customer(LinkedCustomerInput.builder() + .id("12345") + .displayName("Windsurf Shop") + .email("boring@boring.com") + .build()) + .currency(Currency.USD) + .currencyRate(0.69) + .taxInclusive(true) + .subTotal(250d) + .totalTax(25d) + .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) + .paymentMethod("cash") + .paymentMethodReference("123456") + .paymentMethodId("12345") + .account(LinkedLedgerAccount.builder() + .id("123456") + .name("Bank account") + .nominalCode("N091") + .code("453") + .parentId("123456") + .displayId("123456") + .build()) + .lineItems(List.of( + InvoiceLineItemInput.builder() + .id("12345") + .rowId("12345") + .code("120-C") + .lineNumber(1L) + .description("Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.") + .type(InvoiceLineItemType.SALES_ITEM) + .taxAmount(27500d) + .totalAmount(27500d) + .quantity(1d) + .unitPrice(27500.5) + .unitOfMeasure("pc.") + .discountPercentage(0.01) + .discountAmount(19.99) + .serviceDate(LocalDate.parse("2024-01-15")) + .categoryId("12345") + .locationId("12345") + .departmentId("12345") + .subsidiaryId("12345") + .shippingId("12345") + .memo("Some memo") + .prepaid(true) + .item(LinkedInvoiceItem.builder() + .id("12344") + .code("120-C") + .name("Model Y") + .build()) + .taxApplicableOn("Domestic_Purchase_of_Goods_and_Services") + .taxRecoverability("Fully_Recoverable") + .taxMethod("Due_to_Supplier") + .worktags(List.of( + LinkedWorktag.builder() + .id("123456") + .value("New York") + .build())) + .taxRate(LinkedTaxRateInput.builder() + .id("123456") + .code("N-T") + .rate(10d) + .build()) + .trackingCategories(List.of( + LinkedTrackingCategory.builder() + .id("123456") + .code("100") + .name("New York") + .parentId("123456") + .parentName("New York") + .build())) + .ledgerAccount(LinkedLedgerAccount.builder() + .id("123456") + .name("Bank account") + .nominalCode("N091") + .code("453") + .parentId("123456") + .displayId("123456") + .build()) + .customFields(List.of( + CustomField.of(CustomField1.builder() + .id("2389328923893298") + .name("employee_level") + .refName("Marketing") + .description("Employee Level") + .value(CustomField1Value.of("Uses Salesforce and Marketo")) + .build()))) + .rowVersion("1-12345") + .build())) + .taxCode("1234") + .discountPercentage(5.5) + .discountAmount(25d) + .note("Thank you for your purchase") + .customerMemo("Thank you for your business and have a great day!") + .reference("REF-123456") + .billingAddress(Address.builder() + .id("123") + .type(Type.PRIMARY) + .string("25 Spring Street, Blackburn, VIC 3130") + .name("HQ US") + .line1("Main street") + .line2("apt #") + .line3("Suite #") + .line4("delivery instructions") + .line5("Attention: Finance Dept") + .streetNumber("25") + .city("San Francisco") + .state("CA") + .postalCode("94104") + .country("US") + .latitude("40.759211") + .longitude("-73.984638") + .county("Santa Clara") + .contactName("Elon Musk") + .salutation("Mr") + .phoneNumber("111-111-1111") + .fax("122-111-1111") + .email("elon@musk.com") + .website("https://elonmusk.com") + .notes("Address notes or delivery instructions.") + .rowVersion("1-12345") + .build()) + .shippingAddress(Address.builder() + .id("123") + .type(Type.PRIMARY) + .string("25 Spring Street, Blackburn, VIC 3130") + .name("HQ US") + .line1("Main street") + .line2("apt #") + .line3("Suite #") + .line4("delivery instructions") + .line5("Attention: Finance Dept") + .streetNumber("25") + .city("San Francisco") + .state("CA") + .postalCode("94104") + .country("US") + .latitude("40.759211") + .longitude("-73.984638") + .county("Santa Clara") + .contactName("Elon Musk") + .salutation("Mr") + .phoneNumber("111-111-1111") + .fax("122-111-1111") + .email("elon@musk.com") + .website("https://elonmusk.com") + .notes("Address notes or delivery instructions.") + .rowVersion("1-12345") + .build()) + .department(LinkedDepartmentInput.builder() + .displayId("123456") + .name("Acme Inc.") + .build()) + .trackingCategories(List.of( + LinkedTrackingCategory.builder() + .id("123456") + .code("100") + .name("New York") + .parentId("123456") + .parentName("New York") + .build())) + .customFields(List.of( + CustomField.of(CustomField1.builder() + .id("2389328923893298") + .name("employee_level") + .refName("Marketing") + .description("Employee Level") + .value(CustomField1Value.of("Uses Salesforce and Marketo")) + .build()))) + .rowVersion("1-12345") + .passThrough(List.of( + PassThroughBody.builder() + .serviceId("") + .extendPaths(List.of( + ExtendPaths.builder() + .path("$.nested.property") + .value(Map.ofEntries( + Map.entry("TaxClassificationRef", Map.ofEntries( + Map.entry("value", "EUC-99990201-V1-00020000"))))) + .build())) + .build())) + .build()) + .serviceId("salesforce") + .companyId("12345") + .build(); + + AccountingSalesReceiptsUpdateResponse res = sdk.accounting().salesReceipts().update() + .request(req) + .call(); + + if (res.updateSalesReceiptResponse().isPresent()) { + System.out.println(res.updateSalesReceiptResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `request` | [AccountingSalesReceiptsUpdateRequest](../../models/operations/AccountingSalesReceiptsUpdateRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingSalesReceiptsUpdateResponse](../../models/operations/AccountingSalesReceiptsUpdateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## delete + +Delete Sales Receipt + +### Example Usage + + +```java +package hello.world; + +import com.apideck.unify.Apideck; +import com.apideck.unify.models.errors.*; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception { + + Apideck sdk = Apideck.builder() + .consumerId("test-consumer") + .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX") + .apiKey(System.getenv().getOrDefault("API_KEY", "")) + .build(); + + AccountingSalesReceiptsDeleteRequest req = AccountingSalesReceiptsDeleteRequest.builder() + .id("") + .serviceId("salesforce") + .companyId("12345") + .build(); + + AccountingSalesReceiptsDeleteResponse res = sdk.accounting().salesReceipts().delete() + .request(req) + .call(); + + if (res.deleteSalesReceiptResponse().isPresent()) { + System.out.println(res.deleteSalesReceiptResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `request` | [AccountingSalesReceiptsDeleteRequest](../../models/operations/AccountingSalesReceiptsDeleteRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[AccountingSalesReceiptsDeleteResponse](../../models/operations/AccountingSalesReceiptsDeleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models/errors/BadRequestResponse | 400 | application/json | +| models/errors/UnauthorizedResponse | 401 | application/json | +| models/errors/PaymentRequiredResponse | 402 | application/json | +| models/errors/NotFoundResponse | 404 | application/json | +| models/errors/UnprocessableResponse | 422 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index bc239dad0..5f05a93d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.apideck artifactId=unify -version=0.37.0 +version=0.38.0 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/apideck/unify/Accounting.java b/src/main/java/com/apideck/unify/Accounting.java index e866a8c31..31409e9ba 100644 --- a/src/main/java/com/apideck/unify/Accounting.java +++ b/src/main/java/com/apideck/unify/Accounting.java @@ -26,6 +26,7 @@ public class Accounting { private final ProfitAndLoss profitAndLoss; private final JournalEntries journalEntries; private final GeneralLedgerTransactions generalLedgerTransactions; + private final SalesReceipts salesReceipts; private final PurchaseOrders purchaseOrders; private final Subsidiaries subsidiaries; private final Locations locations; @@ -44,6 +45,7 @@ public class Accounting { private final Projects projects; private final Employees employees; private final ExpenseCategories expenseCategories; + private final PaymentMethods paymentMethods; private final ExpenseReports expenseReports; Accounting(SDKConfiguration sdkConfiguration) { @@ -64,6 +66,7 @@ public class Accounting { this.profitAndLoss = new ProfitAndLoss(this.sdkConfiguration); this.journalEntries = new JournalEntries(this.sdkConfiguration); this.generalLedgerTransactions = new GeneralLedgerTransactions(this.sdkConfiguration); + this.salesReceipts = new SalesReceipts(this.sdkConfiguration); this.purchaseOrders = new PurchaseOrders(this.sdkConfiguration); this.subsidiaries = new Subsidiaries(this.sdkConfiguration); this.locations = new Locations(this.sdkConfiguration); @@ -82,6 +85,7 @@ public class Accounting { this.projects = new Projects(this.sdkConfiguration); this.employees = new Employees(this.sdkConfiguration); this.expenseCategories = new ExpenseCategories(this.sdkConfiguration); + this.paymentMethods = new PaymentMethods(this.sdkConfiguration); this.expenseReports = new ExpenseReports(this.sdkConfiguration); this.asyncSDK = new AsyncAccounting(this, sdkConfiguration); } @@ -150,6 +154,10 @@ public final GeneralLedgerTransactions generalLedgerTransactions() { return generalLedgerTransactions; } + public final SalesReceipts salesReceipts() { + return salesReceipts; + } + public final PurchaseOrders purchaseOrders() { return purchaseOrders; } @@ -222,6 +230,10 @@ public final ExpenseCategories expenseCategories() { return expenseCategories; } + public final PaymentMethods paymentMethods() { + return paymentMethods; + } + public final ExpenseReports expenseReports() { return expenseReports; } diff --git a/src/main/java/com/apideck/unify/AsyncAccounting.java b/src/main/java/com/apideck/unify/AsyncAccounting.java index b0c0302d6..c2641b32f 100644 --- a/src/main/java/com/apideck/unify/AsyncAccounting.java +++ b/src/main/java/com/apideck/unify/AsyncAccounting.java @@ -25,6 +25,7 @@ public class AsyncAccounting { private final AsyncProfitAndLoss profitAndLoss; private final AsyncJournalEntries journalEntries; private final AsyncGeneralLedgerTransactions generalLedgerTransactions; + private final AsyncSalesReceipts salesReceipts; private final AsyncPurchaseOrders purchaseOrders; private final AsyncSubsidiaries subsidiaries; private final AsyncLocations locations; @@ -43,6 +44,7 @@ public class AsyncAccounting { private final AsyncProjects projects; private final AsyncEmployees employees; private final AsyncExpenseCategories expenseCategories; + private final AsyncPaymentMethods paymentMethods; private final AsyncExpenseReports expenseReports; private final Accounting syncSDK; @@ -64,6 +66,7 @@ public class AsyncAccounting { this.profitAndLoss = new AsyncProfitAndLoss(syncSDK.profitAndLoss(), this.sdkConfiguration); this.journalEntries = new AsyncJournalEntries(syncSDK.journalEntries(), this.sdkConfiguration); this.generalLedgerTransactions = new AsyncGeneralLedgerTransactions(syncSDK.generalLedgerTransactions(), this.sdkConfiguration); + this.salesReceipts = new AsyncSalesReceipts(syncSDK.salesReceipts(), this.sdkConfiguration); this.purchaseOrders = new AsyncPurchaseOrders(syncSDK.purchaseOrders(), this.sdkConfiguration); this.subsidiaries = new AsyncSubsidiaries(syncSDK.subsidiaries(), this.sdkConfiguration); this.locations = new AsyncLocations(syncSDK.locations(), this.sdkConfiguration); @@ -82,6 +85,7 @@ public class AsyncAccounting { this.projects = new AsyncProjects(syncSDK.projects(), this.sdkConfiguration); this.employees = new AsyncEmployees(syncSDK.employees(), this.sdkConfiguration); this.expenseCategories = new AsyncExpenseCategories(syncSDK.expenseCategories(), this.sdkConfiguration); + this.paymentMethods = new AsyncPaymentMethods(syncSDK.paymentMethods(), this.sdkConfiguration); this.expenseReports = new AsyncExpenseReports(syncSDK.expenseReports(), this.sdkConfiguration); this.syncSDK = syncSDK; } @@ -150,6 +154,10 @@ public final AsyncGeneralLedgerTransactions generalLedgerTransactions() { return generalLedgerTransactions; } + public final AsyncSalesReceipts salesReceipts() { + return salesReceipts; + } + public final AsyncPurchaseOrders purchaseOrders() { return purchaseOrders; } @@ -222,6 +230,10 @@ public final AsyncExpenseCategories expenseCategories() { return expenseCategories; } + public final AsyncPaymentMethods paymentMethods() { + return paymentMethods; + } + public final AsyncExpenseReports expenseReports() { return expenseReports; } diff --git a/src/main/java/com/apideck/unify/AsyncPaymentMethods.java b/src/main/java/com/apideck/unify/AsyncPaymentMethods.java new file mode 100644 index 000000000..8d1c1bc9e --- /dev/null +++ b/src/main/java/com/apideck/unify/AsyncPaymentMethods.java @@ -0,0 +1,263 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateRequest; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsAddRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsAddResponse; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsAllRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsAllResponse; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsDeleteRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsDeleteResponse; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsOneRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsOneResponse; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsUpdateRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingPaymentMethodsUpdateResponse; +import com.apideck.unify.operations.AccountingPaymentMethodsAdd; +import com.apideck.unify.operations.AccountingPaymentMethodsAll; +import com.apideck.unify.operations.AccountingPaymentMethodsDelete; +import com.apideck.unify.operations.AccountingPaymentMethodsOne; +import com.apideck.unify.operations.AccountingPaymentMethodsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + + +public class AsyncPaymentMethods { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final PaymentMethods syncSDK; + + AsyncPaymentMethods(PaymentMethods syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public PaymentMethods sync() { + return syncSDK; + } + + + /** + * List Payment Methods + * + *

List Payment Methods + * + * @return The async call builder + */ + public AccountingPaymentMethodsAllRequestBuilder list() { + return new AccountingPaymentMethodsAllRequestBuilder(sdkConfiguration); + } + + /** + * List Payment Methods + * + *

List Payment Methods + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture list(AccountingPaymentMethodsAllRequest request) { + return list(request, Optional.empty()); + } + + /** + * List Payment Methods + * + *

List Payment Methods + * + * @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(AccountingPaymentMethodsAllRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingPaymentMethodsAll.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create Payment Method + * + *

Create Payment Method + * + * @return The async call builder + */ + public AccountingPaymentMethodsAddRequestBuilder create() { + return new AccountingPaymentMethodsAddRequestBuilder(sdkConfiguration); + } + + /** + * Create Payment Method + * + *

Create Payment Method + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture create(AccountingPaymentMethodsAddRequest request) { + return create(request, Optional.empty()); + } + + /** + * Create Payment Method + * + *

Create Payment Method + * + * @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 create(AccountingPaymentMethodsAddRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingPaymentMethodsAdd.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get Payment Method + * + *

Get Payment Method + * + * @return The async call builder + */ + public AccountingPaymentMethodsOneRequestBuilder get() { + return new AccountingPaymentMethodsOneRequestBuilder(sdkConfiguration); + } + + /** + * Get Payment Method + * + *

Get Payment Method + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture get(AccountingPaymentMethodsOneRequest request) { + return get(request, Optional.empty()); + } + + /** + * Get Payment Method + * + *

Get Payment Method + * + * @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 get(AccountingPaymentMethodsOneRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingPaymentMethodsOne.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Update Payment Method + * + *

Update Payment Method + * + * @return The async call builder + */ + public AccountingPaymentMethodsUpdateRequestBuilder update() { + return new AccountingPaymentMethodsUpdateRequestBuilder(sdkConfiguration); + } + + /** + * Update Payment Method + * + *

Update Payment Method + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update(AccountingPaymentMethodsUpdateRequest request) { + return update(request, Optional.empty()); + } + + /** + * Update Payment Method + * + *

Update Payment Method + * + * @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 update(AccountingPaymentMethodsUpdateRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingPaymentMethodsUpdate.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete Payment Method + * + *

Delete Payment Method + * + * @return The async call builder + */ + public AccountingPaymentMethodsDeleteRequestBuilder delete() { + return new AccountingPaymentMethodsDeleteRequestBuilder(sdkConfiguration); + } + + /** + * Delete Payment Method + * + *

Delete Payment Method + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture delete(AccountingPaymentMethodsDeleteRequest request) { + return delete(request, Optional.empty()); + } + + /** + * Delete Payment Method + * + *

Delete Payment Method + * + * @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 delete(AccountingPaymentMethodsDeleteRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingPaymentMethodsDelete.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/com/apideck/unify/AsyncSalesReceipts.java b/src/main/java/com/apideck/unify/AsyncSalesReceipts.java new file mode 100644 index 000000000..da314a84d --- /dev/null +++ b/src/main/java/com/apideck/unify/AsyncSalesReceipts.java @@ -0,0 +1,263 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateRequest; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsAddRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsAddResponse; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsAllRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsAllResponse; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsDeleteRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsDeleteResponse; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsOneRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsOneResponse; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsUpdateRequestBuilder; +import com.apideck.unify.models.operations.async.AccountingSalesReceiptsUpdateResponse; +import com.apideck.unify.operations.AccountingSalesReceiptsAdd; +import com.apideck.unify.operations.AccountingSalesReceiptsAll; +import com.apideck.unify.operations.AccountingSalesReceiptsDelete; +import com.apideck.unify.operations.AccountingSalesReceiptsOne; +import com.apideck.unify.operations.AccountingSalesReceiptsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + + +public class AsyncSalesReceipts { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final SalesReceipts syncSDK; + + AsyncSalesReceipts(SalesReceipts syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public SalesReceipts sync() { + return syncSDK; + } + + + /** + * List Sales Receipts + * + *

List Sales Receipts + * + * @return The async call builder + */ + public AccountingSalesReceiptsAllRequestBuilder list() { + return new AccountingSalesReceiptsAllRequestBuilder(sdkConfiguration); + } + + /** + * List Sales Receipts + * + *

List Sales Receipts + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture list(AccountingSalesReceiptsAllRequest request) { + return list(request, Optional.empty()); + } + + /** + * List Sales Receipts + * + *

List Sales Receipts + * + * @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(AccountingSalesReceiptsAllRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingSalesReceiptsAll.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create Sales Receipt + * + *

Create Sales Receipt + * + * @return The async call builder + */ + public AccountingSalesReceiptsAddRequestBuilder create() { + return new AccountingSalesReceiptsAddRequestBuilder(sdkConfiguration); + } + + /** + * Create Sales Receipt + * + *

Create Sales Receipt + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture create(AccountingSalesReceiptsAddRequest request) { + return create(request, Optional.empty()); + } + + /** + * Create Sales Receipt + * + *

Create Sales Receipt + * + * @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 create(AccountingSalesReceiptsAddRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingSalesReceiptsAdd.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get Sales Receipt + * + *

Get Sales Receipt + * + * @return The async call builder + */ + public AccountingSalesReceiptsOneRequestBuilder get() { + return new AccountingSalesReceiptsOneRequestBuilder(sdkConfiguration); + } + + /** + * Get Sales Receipt + * + *

Get Sales Receipt + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture get(AccountingSalesReceiptsOneRequest request) { + return get(request, Optional.empty()); + } + + /** + * Get Sales Receipt + * + *

Get Sales Receipt + * + * @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 get(AccountingSalesReceiptsOneRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingSalesReceiptsOne.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Update Sales Receipt + * + *

Update Sales Receipt + * + * @return The async call builder + */ + public AccountingSalesReceiptsUpdateRequestBuilder update() { + return new AccountingSalesReceiptsUpdateRequestBuilder(sdkConfiguration); + } + + /** + * Update Sales Receipt + * + *

Update Sales Receipt + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update(AccountingSalesReceiptsUpdateRequest request) { + return update(request, Optional.empty()); + } + + /** + * Update Sales Receipt + * + *

Update Sales Receipt + * + * @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 update(AccountingSalesReceiptsUpdateRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingSalesReceiptsUpdate.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete Sales Receipt + * + *

Delete Sales Receipt + * + * @return The async call builder + */ + public AccountingSalesReceiptsDeleteRequestBuilder delete() { + return new AccountingSalesReceiptsDeleteRequestBuilder(sdkConfiguration); + } + + /** + * Delete Sales Receipt + * + *

Delete Sales Receipt + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture delete(AccountingSalesReceiptsDeleteRequest request) { + return delete(request, Optional.empty()); + } + + /** + * Delete Sales Receipt + * + *

Delete Sales Receipt + * + * @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 delete(AccountingSalesReceiptsDeleteRequest request, Optional options) { + AsyncRequestOperation operation + = new AccountingSalesReceiptsDelete.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/com/apideck/unify/PaymentMethods.java b/src/main/java/com/apideck/unify/PaymentMethods.java new file mode 100644 index 000000000..6a3bfd3d1 --- /dev/null +++ b/src/main/java/com/apideck/unify/PaymentMethods.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddRequestBuilder; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllRequestBuilder; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteRequestBuilder; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneRequestBuilder; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateRequestBuilder; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateResponse; +import com.apideck.unify.operations.AccountingPaymentMethodsAdd; +import com.apideck.unify.operations.AccountingPaymentMethodsAll; +import com.apideck.unify.operations.AccountingPaymentMethodsDelete; +import com.apideck.unify.operations.AccountingPaymentMethodsOne; +import com.apideck.unify.operations.AccountingPaymentMethodsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import java.util.Optional; + + +public class PaymentMethods { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncPaymentMethods asyncSDK; + + PaymentMethods(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncPaymentMethods(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncPaymentMethods async() { + return asyncSDK; + } + + /** + * List Payment Methods + * + *

List Payment Methods + * + * @return The call builder + */ + public AccountingPaymentMethodsAllRequestBuilder list() { + return new AccountingPaymentMethodsAllRequestBuilder(sdkConfiguration); + } + + /** + * List Payment Methods + * + *

List Payment Methods + * + * @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 AccountingPaymentMethodsAllResponse list(AccountingPaymentMethodsAllRequest request) { + return list(request, Optional.empty()); + } + + /** + * List Payment Methods + * + *

List Payment Methods + * + * @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 AccountingPaymentMethodsAllResponse list(AccountingPaymentMethodsAllRequest request, Optional options) { + RequestOperation operation + = new AccountingPaymentMethodsAll.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create Payment Method + * + *

Create Payment Method + * + * @return The call builder + */ + public AccountingPaymentMethodsAddRequestBuilder create() { + return new AccountingPaymentMethodsAddRequestBuilder(sdkConfiguration); + } + + /** + * Create Payment Method + * + *

Create Payment Method + * + * @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 AccountingPaymentMethodsAddResponse create(AccountingPaymentMethodsAddRequest request) { + return create(request, Optional.empty()); + } + + /** + * Create Payment Method + * + *

Create Payment Method + * + * @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 AccountingPaymentMethodsAddResponse create(AccountingPaymentMethodsAddRequest request, Optional options) { + RequestOperation operation + = new AccountingPaymentMethodsAdd.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get Payment Method + * + *

Get Payment Method + * + * @return The call builder + */ + public AccountingPaymentMethodsOneRequestBuilder get() { + return new AccountingPaymentMethodsOneRequestBuilder(sdkConfiguration); + } + + /** + * Get Payment Method + * + *

Get Payment Method + * + * @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 AccountingPaymentMethodsOneResponse get(AccountingPaymentMethodsOneRequest request) { + return get(request, Optional.empty()); + } + + /** + * Get Payment Method + * + *

Get Payment Method + * + * @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 AccountingPaymentMethodsOneResponse get(AccountingPaymentMethodsOneRequest request, Optional options) { + RequestOperation operation + = new AccountingPaymentMethodsOne.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Update Payment Method + * + *

Update Payment Method + * + * @return The call builder + */ + public AccountingPaymentMethodsUpdateRequestBuilder update() { + return new AccountingPaymentMethodsUpdateRequestBuilder(sdkConfiguration); + } + + /** + * Update Payment Method + * + *

Update Payment Method + * + * @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 AccountingPaymentMethodsUpdateResponse update(AccountingPaymentMethodsUpdateRequest request) { + return update(request, Optional.empty()); + } + + /** + * Update Payment Method + * + *

Update Payment Method + * + * @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 AccountingPaymentMethodsUpdateResponse update(AccountingPaymentMethodsUpdateRequest request, Optional options) { + RequestOperation operation + = new AccountingPaymentMethodsUpdate.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete Payment Method + * + *

Delete Payment Method + * + * @return The call builder + */ + public AccountingPaymentMethodsDeleteRequestBuilder delete() { + return new AccountingPaymentMethodsDeleteRequestBuilder(sdkConfiguration); + } + + /** + * Delete Payment Method + * + *

Delete Payment Method + * + * @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 AccountingPaymentMethodsDeleteResponse delete(AccountingPaymentMethodsDeleteRequest request) { + return delete(request, Optional.empty()); + } + + /** + * Delete Payment Method + * + *

Delete Payment Method + * + * @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 AccountingPaymentMethodsDeleteResponse delete(AccountingPaymentMethodsDeleteRequest request, Optional options) { + RequestOperation operation + = new AccountingPaymentMethodsDelete.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/com/apideck/unify/SDKConfiguration.java b/src/main/java/com/apideck/unify/SDKConfiguration.java index 0fc44dc7e..778b9e5c4 100644 --- a/src/main/java/com/apideck/unify/SDKConfiguration.java +++ b/src/main/java/com/apideck/unify/SDKConfiguration.java @@ -20,9 +20,9 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; - public static final String OPENAPI_DOC_VERSION = "10.32.0"; - public static final String SDK_VERSION = "0.37.0"; - public static final String GEN_VERSION = "2.926.8"; + public static final String OPENAPI_DOC_VERSION = "10.42.0"; + public static final String SDK_VERSION = "0.38.0"; + public static final String GEN_VERSION = "2.931.0"; private static final String BASE_PACKAGE = "com.apideck.unify"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/apideck/unify/SalesReceipts.java b/src/main/java/com/apideck/unify/SalesReceipts.java new file mode 100644 index 000000000..70e2dc16a --- /dev/null +++ b/src/main/java/com/apideck/unify/SalesReceipts.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddRequestBuilder; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllRequestBuilder; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteRequestBuilder; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneRequestBuilder; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateRequestBuilder; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateResponse; +import com.apideck.unify.operations.AccountingSalesReceiptsAdd; +import com.apideck.unify.operations.AccountingSalesReceiptsAll; +import com.apideck.unify.operations.AccountingSalesReceiptsDelete; +import com.apideck.unify.operations.AccountingSalesReceiptsOne; +import com.apideck.unify.operations.AccountingSalesReceiptsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import java.util.Optional; + + +public class SalesReceipts { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncSalesReceipts asyncSDK; + + SalesReceipts(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncSalesReceipts(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncSalesReceipts async() { + return asyncSDK; + } + + /** + * List Sales Receipts + * + *

List Sales Receipts + * + * @return The call builder + */ + public AccountingSalesReceiptsAllRequestBuilder list() { + return new AccountingSalesReceiptsAllRequestBuilder(sdkConfiguration); + } + + /** + * List Sales Receipts + * + *

List Sales Receipts + * + * @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 AccountingSalesReceiptsAllResponse list(AccountingSalesReceiptsAllRequest request) { + return list(request, Optional.empty()); + } + + /** + * List Sales Receipts + * + *

List Sales Receipts + * + * @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 AccountingSalesReceiptsAllResponse list(AccountingSalesReceiptsAllRequest request, Optional options) { + RequestOperation operation + = new AccountingSalesReceiptsAll.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create Sales Receipt + * + *

Create Sales Receipt + * + * @return The call builder + */ + public AccountingSalesReceiptsAddRequestBuilder create() { + return new AccountingSalesReceiptsAddRequestBuilder(sdkConfiguration); + } + + /** + * Create Sales Receipt + * + *

Create Sales Receipt + * + * @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 AccountingSalesReceiptsAddResponse create(AccountingSalesReceiptsAddRequest request) { + return create(request, Optional.empty()); + } + + /** + * Create Sales Receipt + * + *

Create Sales Receipt + * + * @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 AccountingSalesReceiptsAddResponse create(AccountingSalesReceiptsAddRequest request, Optional options) { + RequestOperation operation + = new AccountingSalesReceiptsAdd.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get Sales Receipt + * + *

Get Sales Receipt + * + * @return The call builder + */ + public AccountingSalesReceiptsOneRequestBuilder get() { + return new AccountingSalesReceiptsOneRequestBuilder(sdkConfiguration); + } + + /** + * Get Sales Receipt + * + *

Get Sales Receipt + * + * @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 AccountingSalesReceiptsOneResponse get(AccountingSalesReceiptsOneRequest request) { + return get(request, Optional.empty()); + } + + /** + * Get Sales Receipt + * + *

Get Sales Receipt + * + * @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 AccountingSalesReceiptsOneResponse get(AccountingSalesReceiptsOneRequest request, Optional options) { + RequestOperation operation + = new AccountingSalesReceiptsOne.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Update Sales Receipt + * + *

Update Sales Receipt + * + * @return The call builder + */ + public AccountingSalesReceiptsUpdateRequestBuilder update() { + return new AccountingSalesReceiptsUpdateRequestBuilder(sdkConfiguration); + } + + /** + * Update Sales Receipt + * + *

Update Sales Receipt + * + * @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 AccountingSalesReceiptsUpdateResponse update(AccountingSalesReceiptsUpdateRequest request) { + return update(request, Optional.empty()); + } + + /** + * Update Sales Receipt + * + *

Update Sales Receipt + * + * @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 AccountingSalesReceiptsUpdateResponse update(AccountingSalesReceiptsUpdateRequest request, Optional options) { + RequestOperation operation + = new AccountingSalesReceiptsUpdate.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete Sales Receipt + * + *

Delete Sales Receipt + * + * @return The call builder + */ + public AccountingSalesReceiptsDeleteRequestBuilder delete() { + return new AccountingSalesReceiptsDeleteRequestBuilder(sdkConfiguration); + } + + /** + * Delete Sales Receipt + * + *

Delete Sales Receipt + * + * @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 AccountingSalesReceiptsDeleteResponse delete(AccountingSalesReceiptsDeleteRequest request) { + return delete(request, Optional.empty()); + } + + /** + * Delete Sales Receipt + * + *

Delete Sales Receipt + * + * @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 AccountingSalesReceiptsDeleteResponse delete(AccountingSalesReceiptsDeleteRequest request, Optional options) { + RequestOperation operation + = new AccountingSalesReceiptsDelete.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethod.java b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethod.java new file mode 100644 index 000000000..791df6fc2 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethod.java @@ -0,0 +1,810 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Object; +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; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AccountingPaymentMethod { + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The name of the payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * The type of payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; + + /** + * The status of the payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_mappings") + private JsonNullable> customMappings; + + /** + * The third-party API ID of original entity + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("downstream_id") + private JsonNullable downstreamId; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The user who last updated the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_by") + private JsonNullable updatedBy; + + /** + * The user who created the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_by") + private JsonNullable createdBy; + + /** + * The date and time when the object was last updated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_at") + private JsonNullable updatedAt; + + /** + * The date and time when the object was created. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_at") + private JsonNullable createdAt; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public AccountingPaymentMethod( + @JsonProperty("id") Optional id, + @JsonProperty("name") Optional name, + @JsonProperty("type") JsonNullable type, + @JsonProperty("status") JsonNullable status, + @JsonProperty("custom_mappings") JsonNullable> customMappings, + @JsonProperty("downstream_id") JsonNullable downstreamId, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("updated_by") JsonNullable updatedBy, + @JsonProperty("created_by") JsonNullable createdBy, + @JsonProperty("updated_at") JsonNullable updatedAt, + @JsonProperty("created_at") JsonNullable createdAt, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(customMappings, "customMappings"); + Utils.checkNotNull(downstreamId, "downstreamId"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(updatedBy, "updatedBy"); + Utils.checkNotNull(createdBy, "createdBy"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(passThrough, "passThrough"); + this.id = id; + this.name = name; + this.type = type; + this.status = status; + this.customMappings = customMappings; + this.downstreamId = downstreamId; + this.rowVersion = rowVersion; + this.updatedBy = updatedBy; + this.createdBy = createdBy; + this.updatedAt = updatedAt; + this.createdAt = createdAt; + this.passThrough = passThrough; + } + + public AccountingPaymentMethod() { + this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The name of the payment method. + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * The type of payment method. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + + /** + * The status of the payment method. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> customMappings() { + return (JsonNullable>) customMappings; + } + + /** + * The third-party API ID of original entity + */ + @JsonIgnore + public JsonNullable downstreamId() { + return downstreamId; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The user who last updated the object. + */ + @JsonIgnore + public JsonNullable updatedBy() { + return updatedBy; + } + + /** + * The user who created the object. + */ + @JsonIgnore + public JsonNullable createdBy() { + return createdBy; + } + + /** + * The date and time when the object was last updated. + */ + @JsonIgnore + public JsonNullable updatedAt() { + return updatedAt; + } + + /** + * The date and time when the object was created. + */ + @JsonIgnore + public JsonNullable createdAt() { + return createdAt; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for an object. + */ + public AccountingPaymentMethod withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * A unique identifier for an object. + */ + public AccountingPaymentMethod withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The name of the payment method. + */ + public AccountingPaymentMethod withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The name of the payment method. + */ + public AccountingPaymentMethod withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * The type of payment method. + */ + public AccountingPaymentMethod withType(AccountingPaymentMethodType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of payment method. + */ + public AccountingPaymentMethod withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The status of the payment method. + */ + public AccountingPaymentMethod withStatus(AccountingPaymentMethodStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the payment method. + */ + public AccountingPaymentMethod withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public AccountingPaymentMethod withCustomMappings(Map customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = JsonNullable.of(customMappings); + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public AccountingPaymentMethod withCustomMappings(JsonNullable> customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = customMappings; + return this; + } + + /** + * The third-party API ID of original entity + */ + public AccountingPaymentMethod withDownstreamId(String downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = JsonNullable.of(downstreamId); + return this; + } + + /** + * The third-party API ID of original entity + */ + public AccountingPaymentMethod withDownstreamId(JsonNullable downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = downstreamId; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public AccountingPaymentMethod withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public AccountingPaymentMethod withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The user who last updated the object. + */ + public AccountingPaymentMethod withUpdatedBy(String updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * The user who last updated the object. + */ + public AccountingPaymentMethod withUpdatedBy(JsonNullable updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = updatedBy; + return this; + } + + /** + * The user who created the object. + */ + public AccountingPaymentMethod withCreatedBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * The user who created the object. + */ + public AccountingPaymentMethod withCreatedBy(JsonNullable createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + /** + * The date and time when the object was last updated. + */ + public AccountingPaymentMethod withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * The date and time when the object was last updated. + */ + public AccountingPaymentMethod withUpdatedAt(JsonNullable updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The date and time when the object was created. + */ + public AccountingPaymentMethod withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = JsonNullable.of(createdAt); + return this; + } + + /** + * The date and time when the object was created. + */ + public AccountingPaymentMethod withCreatedAt(JsonNullable createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public AccountingPaymentMethod withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public AccountingPaymentMethod withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethod other = (AccountingPaymentMethod) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.customMappings, other.customMappings) && + Utils.enhancedDeepEquals(this.downstreamId, other.downstreamId) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name, type, + status, customMappings, downstreamId, + rowVersion, updatedBy, createdBy, + updatedAt, createdAt, passThrough); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethod.class, + "id", id, + "name", name, + "type", type, + "status", status, + "customMappings", customMappings, + "downstreamId", downstreamId, + "rowVersion", rowVersion, + "updatedBy", updatedBy, + "createdBy", createdBy, + "updatedAt", updatedAt, + "createdAt", createdAt, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private JsonNullable type = JsonNullable.undefined(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable> customMappings = JsonNullable.undefined(); + + private JsonNullable downstreamId = JsonNullable.undefined(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private JsonNullable updatedBy = JsonNullable.undefined(); + + private JsonNullable createdBy = JsonNullable.undefined(); + + private JsonNullable updatedAt = JsonNullable.undefined(); + + private JsonNullable createdAt = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for an object. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The name of the payment method. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the payment method. + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * The type of payment method. + */ + public Builder type(AccountingPaymentMethodType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of payment method. + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The status of the payment method. + */ + public Builder status(AccountingPaymentMethodStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the payment method. + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Builder customMappings(Map customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = JsonNullable.of(customMappings); + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Builder customMappings(JsonNullable> customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = customMappings; + return this; + } + + + /** + * The third-party API ID of original entity + */ + public Builder downstreamId(String downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = JsonNullable.of(downstreamId); + return this; + } + + /** + * The third-party API ID of original entity + */ + public Builder downstreamId(JsonNullable downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = downstreamId; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The user who last updated the object. + */ + public Builder updatedBy(String updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * The user who last updated the object. + */ + public Builder updatedBy(JsonNullable updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = updatedBy; + return this; + } + + + /** + * The user who created the object. + */ + public Builder createdBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * The user who created the object. + */ + public Builder createdBy(JsonNullable createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + + /** + * The date and time when the object was last updated. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * The date and time when the object was last updated. + */ + public Builder updatedAt(JsonNullable updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * The date and time when the object was created. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = JsonNullable.of(createdAt); + return this; + } + + /** + * The date and time when the object was created. + */ + public Builder createdAt(JsonNullable createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public AccountingPaymentMethod build() { + + return new AccountingPaymentMethod( + id, name, type, + status, customMappings, downstreamId, + rowVersion, updatedBy, createdBy, + updatedAt, createdAt, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodInput.java b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodInput.java new file mode 100644 index 000000000..3ab5713aa --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodInput.java @@ -0,0 +1,386 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AccountingPaymentMethodInput { + /** + * The name of the payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * The type of payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; + + /** + * The status of the payment method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public AccountingPaymentMethodInput( + @JsonProperty("name") Optional name, + @JsonProperty("type") JsonNullable type, + @JsonProperty("status") JsonNullable status, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.name = name; + this.type = type; + this.status = status; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public AccountingPaymentMethodInput() { + this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * The name of the payment method. + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * The type of payment method. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + + /** + * The status of the payment method. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The name of the payment method. + */ + public AccountingPaymentMethodInput withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The name of the payment method. + */ + public AccountingPaymentMethodInput withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * The type of payment method. + */ + public AccountingPaymentMethodInput withType(AccountingPaymentMethodType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of payment method. + */ + public AccountingPaymentMethodInput withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The status of the payment method. + */ + public AccountingPaymentMethodInput withStatus(AccountingPaymentMethodStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the payment method. + */ + public AccountingPaymentMethodInput withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public AccountingPaymentMethodInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public AccountingPaymentMethodInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public AccountingPaymentMethodInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public AccountingPaymentMethodInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodInput other = (AccountingPaymentMethodInput) o; + return + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + name, type, status, + rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodInput.class, + "name", name, + "type", type, + "status", status, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional name = Optional.empty(); + + private JsonNullable type = JsonNullable.undefined(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The name of the payment method. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the payment method. + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * The type of payment method. + */ + public Builder type(AccountingPaymentMethodType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of payment method. + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The status of the payment method. + */ + public Builder status(AccountingPaymentMethodStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the payment method. + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public AccountingPaymentMethodInput build() { + + return new AccountingPaymentMethodInput( + name, type, status, + rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodStatus.java b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodStatus.java new file mode 100644 index 000000000..39cec7a25 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodStatus.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +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. + */ +/** + * AccountingPaymentMethodStatus + * + *

The status of the payment method. + */ +public class AccountingPaymentMethodStatus { + + public static final AccountingPaymentMethodStatus ACTIVE = new AccountingPaymentMethodStatus("active"); + public static final AccountingPaymentMethodStatus INACTIVE = new AccountingPaymentMethodStatus("inactive"); + + // 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 AccountingPaymentMethodStatus(String value) { + this.value = value; + } + + /** + * Returns a AccountingPaymentMethodStatus 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 AccountingPaymentMethodStatus + */ + @JsonCreator + public static AccountingPaymentMethodStatus of(String value) { + synchronized (AccountingPaymentMethodStatus.class) { + return values.computeIfAbsent(value, v -> new AccountingPaymentMethodStatus(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; + AccountingPaymentMethodStatus other = (AccountingPaymentMethodStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "AccountingPaymentMethodStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static AccountingPaymentMethodStatus[] values() { + synchronized (AccountingPaymentMethodStatus.class) { + return values.values().toArray(new AccountingPaymentMethodStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("active", ACTIVE); + map.put("inactive", INACTIVE); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("active", AccountingPaymentMethodStatusEnum.ACTIVE); + map.put("inactive", AccountingPaymentMethodStatusEnum.INACTIVE); + return map; + } + + + public enum AccountingPaymentMethodStatusEnum { + + ACTIVE("active"), + INACTIVE("inactive"),; + + private final String value; + + private AccountingPaymentMethodStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodType.java b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodType.java new file mode 100644 index 000000000..393f201d2 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/AccountingPaymentMethodType.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +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. + */ +/** + * AccountingPaymentMethodType + * + *

The type of payment method. + */ +public class AccountingPaymentMethodType { + + public static final AccountingPaymentMethodType CASH = new AccountingPaymentMethodType("cash"); + public static final AccountingPaymentMethodType CHECK = new AccountingPaymentMethodType("check"); + public static final AccountingPaymentMethodType CREDIT_CARD = new AccountingPaymentMethodType("credit_card"); + public static final AccountingPaymentMethodType DEBIT_CARD = new AccountingPaymentMethodType("debit_card"); + public static final AccountingPaymentMethodType BANK_TRANSFER = new AccountingPaymentMethodType("bank_transfer"); + public static final AccountingPaymentMethodType ELECTRONIC = new AccountingPaymentMethodType("electronic"); + public static final AccountingPaymentMethodType OTHER = new AccountingPaymentMethodType("other"); + public static final AccountingPaymentMethodType UNKNOWN = new AccountingPaymentMethodType("unknown"); + + // 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 AccountingPaymentMethodType(String value) { + this.value = value; + } + + /** + * Returns a AccountingPaymentMethodType 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 AccountingPaymentMethodType + */ + @JsonCreator + public static AccountingPaymentMethodType of(String value) { + synchronized (AccountingPaymentMethodType.class) { + return values.computeIfAbsent(value, v -> new AccountingPaymentMethodType(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; + AccountingPaymentMethodType other = (AccountingPaymentMethodType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "AccountingPaymentMethodType [value=" + value + "]"; + } + + // return an array just like an enum + public static AccountingPaymentMethodType[] values() { + synchronized (AccountingPaymentMethodType.class) { + return values.values().toArray(new AccountingPaymentMethodType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("cash", CASH); + map.put("check", CHECK); + map.put("credit_card", CREDIT_CARD); + map.put("debit_card", DEBIT_CARD); + map.put("bank_transfer", BANK_TRANSFER); + map.put("electronic", ELECTRONIC); + map.put("other", OTHER); + map.put("unknown", UNKNOWN); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("cash", AccountingPaymentMethodTypeEnum.CASH); + map.put("check", AccountingPaymentMethodTypeEnum.CHECK); + map.put("credit_card", AccountingPaymentMethodTypeEnum.CREDIT_CARD); + map.put("debit_card", AccountingPaymentMethodTypeEnum.DEBIT_CARD); + map.put("bank_transfer", AccountingPaymentMethodTypeEnum.BANK_TRANSFER); + map.put("electronic", AccountingPaymentMethodTypeEnum.ELECTRONIC); + map.put("other", AccountingPaymentMethodTypeEnum.OTHER); + map.put("unknown", AccountingPaymentMethodTypeEnum.UNKNOWN); + return map; + } + + + public enum AccountingPaymentMethodTypeEnum { + + CASH("cash"), + CHECK("check"), + CREDIT_CARD("credit_card"), + DEBIT_CARD("debit_card"), + BANK_TRANSFER("bank_transfer"), + ELECTRONIC("electronic"), + OTHER("other"), + UNKNOWN("unknown"),; + + private final String value; + + private AccountingPaymentMethodTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/Attachment.java b/src/main/java/com/apideck/unify/models/components/Attachment.java index 05c52a0cb..3ee706636 100644 --- a/src/main/java/com/apideck/unify/models/components/Attachment.java +++ b/src/main/java/com/apideck/unify/models/components/Attachment.java @@ -67,6 +67,13 @@ public class Attachment { @JsonProperty("description") private JsonNullable description; + /** + * The URL to download or preview the file + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("file_url") + private JsonNullable fileUrl; + /** * The folder id where this attachment belong to */ @@ -119,6 +126,7 @@ public Attachment( @JsonProperty("size") JsonNullable size, @JsonProperty("reference") Optional reference, @JsonProperty("description") JsonNullable description, + @JsonProperty("file_url") JsonNullable fileUrl, @JsonProperty("parent_folder_id") JsonNullable parentFolderId, @JsonProperty("updated_by") JsonNullable updatedBy, @JsonProperty("created_by") JsonNullable createdBy, @@ -132,6 +140,7 @@ public Attachment( Utils.checkNotNull(size, "size"); Utils.checkNotNull(reference, "reference"); Utils.checkNotNull(description, "description"); + Utils.checkNotNull(fileUrl, "fileUrl"); Utils.checkNotNull(parentFolderId, "parentFolderId"); Utils.checkNotNull(updatedBy, "updatedBy"); Utils.checkNotNull(createdBy, "createdBy"); @@ -145,6 +154,7 @@ public Attachment( this.size = size; this.reference = reference; this.description = description; + this.fileUrl = fileUrl; this.parentFolderId = parentFolderId; this.updatedBy = updatedBy; this.createdBy = createdBy; @@ -158,7 +168,7 @@ public Attachment() { JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty()); + JsonNullable.undefined(), Optional.empty()); } /** @@ -215,6 +225,14 @@ public JsonNullable description() { return description; } + /** + * The URL to download or preview the file + */ + @JsonIgnore + public JsonNullable fileUrl() { + return fileUrl; + } + /** * The folder id where this attachment belong to */ @@ -392,6 +410,24 @@ public Attachment withDescription(JsonNullable description) { return this; } + /** + * The URL to download or preview the file + */ + public Attachment withFileUrl(String fileUrl) { + Utils.checkNotNull(fileUrl, "fileUrl"); + this.fileUrl = JsonNullable.of(fileUrl); + return this; + } + + /** + * The URL to download or preview the file + */ + public Attachment withFileUrl(JsonNullable fileUrl) { + Utils.checkNotNull(fileUrl, "fileUrl"); + this.fileUrl = fileUrl; + return this; + } + /** * The folder id where this attachment belong to */ @@ -520,6 +556,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.size, other.size) && Utils.enhancedDeepEquals(this.reference, other.reference) && Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.fileUrl, other.fileUrl) && Utils.enhancedDeepEquals(this.parentFolderId, other.parentFolderId) && Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && @@ -533,9 +570,9 @@ public int hashCode() { return Utils.enhancedHash( id, displayId, name, mimeType, size, reference, - description, parentFolderId, updatedBy, - createdBy, updatedAt, createdAt, - passThrough); + description, fileUrl, parentFolderId, + updatedBy, createdBy, updatedAt, + createdAt, passThrough); } @Override @@ -548,6 +585,7 @@ public String toString() { "size", size, "reference", reference, "description", description, + "fileUrl", fileUrl, "parentFolderId", parentFolderId, "updatedBy", updatedBy, "createdBy", createdBy, @@ -573,6 +611,8 @@ public final static class Builder { private JsonNullable description = JsonNullable.undefined(); + private JsonNullable fileUrl = JsonNullable.undefined(); + private JsonNullable parentFolderId = JsonNullable.undefined(); private JsonNullable updatedBy = JsonNullable.undefined(); @@ -717,6 +757,25 @@ public Builder description(JsonNullable description) { } + /** + * The URL to download or preview the file + */ + public Builder fileUrl(String fileUrl) { + Utils.checkNotNull(fileUrl, "fileUrl"); + this.fileUrl = JsonNullable.of(fileUrl); + return this; + } + + /** + * The URL to download or preview the file + */ + public Builder fileUrl(JsonNullable fileUrl) { + Utils.checkNotNull(fileUrl, "fileUrl"); + this.fileUrl = fileUrl; + return this; + } + + /** * The folder id where this attachment belong to */ @@ -837,9 +896,9 @@ public Attachment build() { return new Attachment( id, displayId, name, mimeType, size, reference, - description, parentFolderId, updatedBy, - createdBy, updatedAt, createdAt, - passThrough); + description, fileUrl, parentFolderId, + updatedBy, createdBy, updatedAt, + createdAt, passThrough); } } diff --git a/src/main/java/com/apideck/unify/models/components/BankFeedAccount.java b/src/main/java/com/apideck/unify/models/components/BankFeedAccount.java index 38819e854..8d5fa8d2a 100644 --- a/src/main/java/com/apideck/unify/models/components/BankFeedAccount.java +++ b/src/main/java/com/apideck/unify/models/components/BankFeedAccount.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; import java.lang.Object; import java.lang.Override; import java.lang.String; @@ -41,6 +42,20 @@ public class BankFeedAccount { @JsonProperty("source_account_id") private Optional sourceAccountId; + /** + * Bank routing number (US) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_routing_number") + private JsonNullable sourceRoutingNumber; + + /** + * The bank account number + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_account_number") + private JsonNullable sourceAccountNumber; + /** * The target account's unique identifier in the accounting connector. */ @@ -62,6 +77,20 @@ public class BankFeedAccount { @JsonProperty("target_account_number") private Optional targetAccountNumber; + /** + * The current balance of the source bank account. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("balance") + private JsonNullable balance; + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("available_balance") + private JsonNullable availableBalance; + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -129,9 +158,13 @@ public BankFeedAccount( @JsonProperty("id") String id, @JsonProperty("bank_account_type") Optional bankAccountType, @JsonProperty("source_account_id") Optional sourceAccountId, + @JsonProperty("source_routing_number") JsonNullable sourceRoutingNumber, + @JsonProperty("source_account_number") JsonNullable sourceAccountNumber, @JsonProperty("target_account_id") Optional targetAccountId, @JsonProperty("target_account_name") Optional targetAccountName, @JsonProperty("target_account_number") Optional targetAccountNumber, + @JsonProperty("balance") JsonNullable balance, + @JsonProperty("available_balance") JsonNullable availableBalance, @JsonProperty("currency") JsonNullable currency, @JsonProperty("feed_status") Optional feedStatus, @JsonProperty("country") JsonNullable country, @@ -144,9 +177,13 @@ public BankFeedAccount( Utils.checkNotNull(id, "id"); Utils.checkNotNull(bankAccountType, "bankAccountType"); Utils.checkNotNull(sourceAccountId, "sourceAccountId"); + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); Utils.checkNotNull(targetAccountId, "targetAccountId"); Utils.checkNotNull(targetAccountName, "targetAccountName"); Utils.checkNotNull(targetAccountNumber, "targetAccountNumber"); + Utils.checkNotNull(balance, "balance"); + Utils.checkNotNull(availableBalance, "availableBalance"); Utils.checkNotNull(currency, "currency"); Utils.checkNotNull(feedStatus, "feedStatus"); Utils.checkNotNull(country, "country"); @@ -159,9 +196,13 @@ public BankFeedAccount( this.id = id; this.bankAccountType = bankAccountType; this.sourceAccountId = sourceAccountId; + this.sourceRoutingNumber = sourceRoutingNumber; + this.sourceAccountNumber = sourceAccountNumber; this.targetAccountId = targetAccountId; this.targetAccountName = targetAccountName; this.targetAccountNumber = targetAccountNumber; + this.balance = balance; + this.availableBalance = availableBalance; this.currency = currency; this.feedStatus = feedStatus; this.country = country; @@ -176,10 +217,12 @@ public BankFeedAccount( public BankFeedAccount( String id) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined()); } /** @@ -207,6 +250,22 @@ public Optional sourceAccountId() { return sourceAccountId; } + /** + * Bank routing number (US) + */ + @JsonIgnore + public JsonNullable sourceRoutingNumber() { + return sourceRoutingNumber; + } + + /** + * The bank account number + */ + @JsonIgnore + public JsonNullable sourceAccountNumber() { + return sourceAccountNumber; + } + /** * The target account's unique identifier in the accounting connector. */ @@ -231,6 +290,22 @@ public Optional targetAccountNumber() { return targetAccountNumber; } + /** + * The current balance of the source bank account. + */ + @JsonIgnore + public JsonNullable balance() { + return balance; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + @JsonIgnore + public JsonNullable availableBalance() { + return availableBalance; + } + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -357,6 +432,42 @@ public BankFeedAccount withSourceAccountId(Optional sourceAccountId) { return this; } + /** + * Bank routing number (US) + */ + public BankFeedAccount withSourceRoutingNumber(String sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = JsonNullable.of(sourceRoutingNumber); + return this; + } + + /** + * Bank routing number (US) + */ + public BankFeedAccount withSourceRoutingNumber(JsonNullable sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = sourceRoutingNumber; + return this; + } + + /** + * The bank account number + */ + public BankFeedAccount withSourceAccountNumber(String sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = JsonNullable.of(sourceAccountNumber); + return this; + } + + /** + * The bank account number + */ + public BankFeedAccount withSourceAccountNumber(JsonNullable sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = sourceAccountNumber; + return this; + } + /** * The target account's unique identifier in the accounting connector. */ @@ -414,6 +525,42 @@ public BankFeedAccount withTargetAccountNumber(Optional targetAccountNum return this; } + /** + * The current balance of the source bank account. + */ + public BankFeedAccount withBalance(double balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = JsonNullable.of(balance); + return this; + } + + /** + * The current balance of the source bank account. + */ + public BankFeedAccount withBalance(JsonNullable balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = balance; + return this; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public BankFeedAccount withAvailableBalance(double availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = JsonNullable.of(availableBalance); + return this; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public BankFeedAccount withAvailableBalance(JsonNullable availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = availableBalance; + return this; + } + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -587,9 +734,13 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.id, other.id) && Utils.enhancedDeepEquals(this.bankAccountType, other.bankAccountType) && Utils.enhancedDeepEquals(this.sourceAccountId, other.sourceAccountId) && + Utils.enhancedDeepEquals(this.sourceRoutingNumber, other.sourceRoutingNumber) && + Utils.enhancedDeepEquals(this.sourceAccountNumber, other.sourceAccountNumber) && Utils.enhancedDeepEquals(this.targetAccountId, other.targetAccountId) && Utils.enhancedDeepEquals(this.targetAccountName, other.targetAccountName) && Utils.enhancedDeepEquals(this.targetAccountNumber, other.targetAccountNumber) && + Utils.enhancedDeepEquals(this.balance, other.balance) && + Utils.enhancedDeepEquals(this.availableBalance, other.availableBalance) && Utils.enhancedDeepEquals(this.currency, other.currency) && Utils.enhancedDeepEquals(this.feedStatus, other.feedStatus) && Utils.enhancedDeepEquals(this.country, other.country) && @@ -605,10 +756,12 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( id, bankAccountType, sourceAccountId, - targetAccountId, targetAccountName, targetAccountNumber, - currency, feedStatus, country, - customFields, customMappings, createdAt, - updatedAt, updatedBy, createdBy); + sourceRoutingNumber, sourceAccountNumber, targetAccountId, + targetAccountName, targetAccountNumber, balance, + availableBalance, currency, feedStatus, + country, customFields, customMappings, + createdAt, updatedAt, updatedBy, + createdBy); } @Override @@ -617,9 +770,13 @@ public String toString() { "id", id, "bankAccountType", bankAccountType, "sourceAccountId", sourceAccountId, + "sourceRoutingNumber", sourceRoutingNumber, + "sourceAccountNumber", sourceAccountNumber, "targetAccountId", targetAccountId, "targetAccountName", targetAccountName, "targetAccountNumber", targetAccountNumber, + "balance", balance, + "availableBalance", availableBalance, "currency", currency, "feedStatus", feedStatus, "country", country, @@ -640,12 +797,20 @@ public final static class Builder { private Optional sourceAccountId = Optional.empty(); + private JsonNullable sourceRoutingNumber = JsonNullable.undefined(); + + private JsonNullable sourceAccountNumber = JsonNullable.undefined(); + private Optional targetAccountId = Optional.empty(); private Optional targetAccountName = Optional.empty(); private Optional targetAccountNumber = Optional.empty(); + private JsonNullable balance = JsonNullable.undefined(); + + private JsonNullable availableBalance = JsonNullable.undefined(); + private JsonNullable currency = JsonNullable.undefined(); private Optional feedStatus = Optional.empty(); @@ -717,6 +882,44 @@ public Builder sourceAccountId(Optional sourceAccountId) { } + /** + * Bank routing number (US) + */ + public Builder sourceRoutingNumber(String sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = JsonNullable.of(sourceRoutingNumber); + return this; + } + + /** + * Bank routing number (US) + */ + public Builder sourceRoutingNumber(JsonNullable sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = sourceRoutingNumber; + return this; + } + + + /** + * The bank account number + */ + public Builder sourceAccountNumber(String sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = JsonNullable.of(sourceAccountNumber); + return this; + } + + /** + * The bank account number + */ + public Builder sourceAccountNumber(JsonNullable sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = sourceAccountNumber; + return this; + } + + /** * The target account's unique identifier in the accounting connector. */ @@ -774,6 +977,44 @@ public Builder targetAccountNumber(Optional targetAccountNumber) { } + /** + * The current balance of the source bank account. + */ + public Builder balance(double balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = JsonNullable.of(balance); + return this; + } + + /** + * The current balance of the source bank account. + */ + public Builder balance(JsonNullable balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = balance; + return this; + } + + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public Builder availableBalance(double availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = JsonNullable.of(availableBalance); + return this; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public Builder availableBalance(JsonNullable availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = availableBalance; + return this; + } + + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -944,10 +1185,12 @@ public BankFeedAccount build() { return new BankFeedAccount( id, bankAccountType, sourceAccountId, - targetAccountId, targetAccountName, targetAccountNumber, - currency, feedStatus, country, - customFields, customMappings, createdAt, - updatedAt, updatedBy, createdBy); + sourceRoutingNumber, sourceAccountNumber, targetAccountId, + targetAccountName, targetAccountNumber, balance, + availableBalance, currency, feedStatus, + country, customFields, customMappings, + createdAt, updatedAt, updatedBy, + createdBy); } } diff --git a/src/main/java/com/apideck/unify/models/components/BankFeedAccountInput.java b/src/main/java/com/apideck/unify/models/components/BankFeedAccountInput.java index b08aaee37..1712a9732 100644 --- a/src/main/java/com/apideck/unify/models/components/BankFeedAccountInput.java +++ b/src/main/java/com/apideck/unify/models/components/BankFeedAccountInput.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -32,6 +33,20 @@ public class BankFeedAccountInput { @JsonProperty("source_account_id") private Optional sourceAccountId; + /** + * Bank routing number (US) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_routing_number") + private JsonNullable sourceRoutingNumber; + + /** + * The bank account number + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_account_number") + private JsonNullable sourceAccountNumber; + /** * The target account's unique identifier in the accounting connector. */ @@ -53,6 +68,20 @@ public class BankFeedAccountInput { @JsonProperty("target_account_number") private Optional targetAccountNumber; + /** + * The current balance of the source bank account. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("balance") + private JsonNullable balance; + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("available_balance") + private JsonNullable availableBalance; + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -84,27 +113,39 @@ public class BankFeedAccountInput { public BankFeedAccountInput( @JsonProperty("bank_account_type") Optional bankAccountType, @JsonProperty("source_account_id") Optional sourceAccountId, + @JsonProperty("source_routing_number") JsonNullable sourceRoutingNumber, + @JsonProperty("source_account_number") JsonNullable sourceAccountNumber, @JsonProperty("target_account_id") Optional targetAccountId, @JsonProperty("target_account_name") Optional targetAccountName, @JsonProperty("target_account_number") Optional targetAccountNumber, + @JsonProperty("balance") JsonNullable balance, + @JsonProperty("available_balance") JsonNullable availableBalance, @JsonProperty("currency") JsonNullable currency, @JsonProperty("feed_status") Optional feedStatus, @JsonProperty("country") JsonNullable country, @JsonProperty("custom_fields") Optional> customFields) { Utils.checkNotNull(bankAccountType, "bankAccountType"); Utils.checkNotNull(sourceAccountId, "sourceAccountId"); + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); Utils.checkNotNull(targetAccountId, "targetAccountId"); Utils.checkNotNull(targetAccountName, "targetAccountName"); Utils.checkNotNull(targetAccountNumber, "targetAccountNumber"); + Utils.checkNotNull(balance, "balance"); + Utils.checkNotNull(availableBalance, "availableBalance"); Utils.checkNotNull(currency, "currency"); Utils.checkNotNull(feedStatus, "feedStatus"); Utils.checkNotNull(country, "country"); Utils.checkNotNull(customFields, "customFields"); this.bankAccountType = bankAccountType; this.sourceAccountId = sourceAccountId; + this.sourceRoutingNumber = sourceRoutingNumber; + this.sourceAccountNumber = sourceAccountNumber; this.targetAccountId = targetAccountId; this.targetAccountName = targetAccountName; this.targetAccountNumber = targetAccountNumber; + this.balance = balance; + this.availableBalance = availableBalance; this.currency = currency; this.feedStatus = feedStatus; this.country = country; @@ -112,9 +153,11 @@ public BankFeedAccountInput( } public BankFeedAccountInput() { - this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), JsonNullable.undefined(), - Optional.empty(), JsonNullable.undefined(), Optional.empty()); + this(Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + Optional.empty()); } /** @@ -134,6 +177,22 @@ public Optional sourceAccountId() { return sourceAccountId; } + /** + * Bank routing number (US) + */ + @JsonIgnore + public JsonNullable sourceRoutingNumber() { + return sourceRoutingNumber; + } + + /** + * The bank account number + */ + @JsonIgnore + public JsonNullable sourceAccountNumber() { + return sourceAccountNumber; + } + /** * The target account's unique identifier in the accounting connector. */ @@ -158,6 +217,22 @@ public Optional targetAccountNumber() { return targetAccountNumber; } + /** + * The current balance of the source bank account. + */ + @JsonIgnore + public JsonNullable balance() { + return balance; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + @JsonIgnore + public JsonNullable availableBalance() { + return availableBalance; + } + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -234,6 +309,42 @@ public BankFeedAccountInput withSourceAccountId(Optional sourceAccountId return this; } + /** + * Bank routing number (US) + */ + public BankFeedAccountInput withSourceRoutingNumber(String sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = JsonNullable.of(sourceRoutingNumber); + return this; + } + + /** + * Bank routing number (US) + */ + public BankFeedAccountInput withSourceRoutingNumber(JsonNullable sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = sourceRoutingNumber; + return this; + } + + /** + * The bank account number + */ + public BankFeedAccountInput withSourceAccountNumber(String sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = JsonNullable.of(sourceAccountNumber); + return this; + } + + /** + * The bank account number + */ + public BankFeedAccountInput withSourceAccountNumber(JsonNullable sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = sourceAccountNumber; + return this; + } + /** * The target account's unique identifier in the accounting connector. */ @@ -291,6 +402,42 @@ public BankFeedAccountInput withTargetAccountNumber(Optional targetAccou return this; } + /** + * The current balance of the source bank account. + */ + public BankFeedAccountInput withBalance(double balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = JsonNullable.of(balance); + return this; + } + + /** + * The current balance of the source bank account. + */ + public BankFeedAccountInput withBalance(JsonNullable balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = balance; + return this; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public BankFeedAccountInput withAvailableBalance(double availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = JsonNullable.of(availableBalance); + return this; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public BankFeedAccountInput withAvailableBalance(JsonNullable availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = availableBalance; + return this; + } + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -373,9 +520,13 @@ public boolean equals(java.lang.Object o) { return Utils.enhancedDeepEquals(this.bankAccountType, other.bankAccountType) && Utils.enhancedDeepEquals(this.sourceAccountId, other.sourceAccountId) && + Utils.enhancedDeepEquals(this.sourceRoutingNumber, other.sourceRoutingNumber) && + Utils.enhancedDeepEquals(this.sourceAccountNumber, other.sourceAccountNumber) && Utils.enhancedDeepEquals(this.targetAccountId, other.targetAccountId) && Utils.enhancedDeepEquals(this.targetAccountName, other.targetAccountName) && Utils.enhancedDeepEquals(this.targetAccountNumber, other.targetAccountNumber) && + Utils.enhancedDeepEquals(this.balance, other.balance) && + Utils.enhancedDeepEquals(this.availableBalance, other.availableBalance) && Utils.enhancedDeepEquals(this.currency, other.currency) && Utils.enhancedDeepEquals(this.feedStatus, other.feedStatus) && Utils.enhancedDeepEquals(this.country, other.country) && @@ -385,9 +536,11 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - bankAccountType, sourceAccountId, targetAccountId, - targetAccountName, targetAccountNumber, currency, - feedStatus, country, customFields); + bankAccountType, sourceAccountId, sourceRoutingNumber, + sourceAccountNumber, targetAccountId, targetAccountName, + targetAccountNumber, balance, availableBalance, + currency, feedStatus, country, + customFields); } @Override @@ -395,9 +548,13 @@ public String toString() { return Utils.toString(BankFeedAccountInput.class, "bankAccountType", bankAccountType, "sourceAccountId", sourceAccountId, + "sourceRoutingNumber", sourceRoutingNumber, + "sourceAccountNumber", sourceAccountNumber, "targetAccountId", targetAccountId, "targetAccountName", targetAccountName, "targetAccountNumber", targetAccountNumber, + "balance", balance, + "availableBalance", availableBalance, "currency", currency, "feedStatus", feedStatus, "country", country, @@ -411,12 +568,20 @@ public final static class Builder { private Optional sourceAccountId = Optional.empty(); + private JsonNullable sourceRoutingNumber = JsonNullable.undefined(); + + private JsonNullable sourceAccountNumber = JsonNullable.undefined(); + private Optional targetAccountId = Optional.empty(); private Optional targetAccountName = Optional.empty(); private Optional targetAccountNumber = Optional.empty(); + private JsonNullable balance = JsonNullable.undefined(); + + private JsonNullable availableBalance = JsonNullable.undefined(); + private JsonNullable currency = JsonNullable.undefined(); private Optional feedStatus = Optional.empty(); @@ -468,6 +633,44 @@ public Builder sourceAccountId(Optional sourceAccountId) { } + /** + * Bank routing number (US) + */ + public Builder sourceRoutingNumber(String sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = JsonNullable.of(sourceRoutingNumber); + return this; + } + + /** + * Bank routing number (US) + */ + public Builder sourceRoutingNumber(JsonNullable sourceRoutingNumber) { + Utils.checkNotNull(sourceRoutingNumber, "sourceRoutingNumber"); + this.sourceRoutingNumber = sourceRoutingNumber; + return this; + } + + + /** + * The bank account number + */ + public Builder sourceAccountNumber(String sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = JsonNullable.of(sourceAccountNumber); + return this; + } + + /** + * The bank account number + */ + public Builder sourceAccountNumber(JsonNullable sourceAccountNumber) { + Utils.checkNotNull(sourceAccountNumber, "sourceAccountNumber"); + this.sourceAccountNumber = sourceAccountNumber; + return this; + } + + /** * The target account's unique identifier in the accounting connector. */ @@ -525,6 +728,44 @@ public Builder targetAccountNumber(Optional targetAccountNumber) { } + /** + * The current balance of the source bank account. + */ + public Builder balance(double balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = JsonNullable.of(balance); + return this; + } + + /** + * The current balance of the source bank account. + */ + public Builder balance(JsonNullable balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = balance; + return this; + } + + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public Builder availableBalance(double availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = JsonNullable.of(availableBalance); + return this; + } + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + */ + public Builder availableBalance(JsonNullable availableBalance) { + Utils.checkNotNull(availableBalance, "availableBalance"); + this.availableBalance = availableBalance; + return this; + } + + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO * 4217](https://en.wikipedia.org/wiki/ISO_4217). @@ -599,9 +840,11 @@ public Builder customFields(Optional> customFields) public BankFeedAccountInput build() { return new BankFeedAccountInput( - bankAccountType, sourceAccountId, targetAccountId, - targetAccountName, targetAccountNumber, currency, - feedStatus, country, customFields); + bankAccountType, sourceAccountId, sourceRoutingNumber, + sourceAccountNumber, targetAccountId, targetAccountName, + targetAccountNumber, balance, availableBalance, + currency, feedStatus, country, + customFields); } } diff --git a/src/main/java/com/apideck/unify/models/components/CreatePaymentMethodResponse.java b/src/main/java/com/apideck/unify/models/components/CreatePaymentMethodResponse.java new file mode 100644 index 000000000..5713eedbf --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/CreatePaymentMethodResponse.java @@ -0,0 +1,388 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * CreatePaymentMethodResponse + * + *

Payment Methods + */ +public class CreatePaymentMethodResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonProperty("data") + private UnifiedId data; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public CreatePaymentMethodResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") UnifiedId data, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.raw = raw; + } + + public CreatePaymentMethodResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + UnifiedId data) { + this(statusCode, status, service, + resource, operation, data, + JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonIgnore + public UnifiedId data() { + return data; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public CreatePaymentMethodResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public CreatePaymentMethodResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public CreatePaymentMethodResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public CreatePaymentMethodResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public CreatePaymentMethodResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public CreatePaymentMethodResponse withData(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public CreatePaymentMethodResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public CreatePaymentMethodResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatePaymentMethodResponse other = (CreatePaymentMethodResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + raw); + } + + @Override + public String toString() { + return Utils.toString(CreatePaymentMethodResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private UnifiedId data; + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public Builder data(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public CreatePaymentMethodResponse build() { + + return new CreatePaymentMethodResponse( + statusCode, status, service, + resource, operation, data, + raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/CreateSalesReceiptResponse.java b/src/main/java/com/apideck/unify/models/components/CreateSalesReceiptResponse.java new file mode 100644 index 000000000..dfb236738 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/CreateSalesReceiptResponse.java @@ -0,0 +1,388 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * CreateSalesReceiptResponse + * + *

SalesReceipt created + */ +public class CreateSalesReceiptResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonProperty("data") + private UnifiedId data; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public CreateSalesReceiptResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") UnifiedId data, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.raw = raw; + } + + public CreateSalesReceiptResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + UnifiedId data) { + this(statusCode, status, service, + resource, operation, data, + JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonIgnore + public UnifiedId data() { + return data; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public CreateSalesReceiptResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public CreateSalesReceiptResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public CreateSalesReceiptResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public CreateSalesReceiptResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public CreateSalesReceiptResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public CreateSalesReceiptResponse withData(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public CreateSalesReceiptResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public CreateSalesReceiptResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSalesReceiptResponse other = (CreateSalesReceiptResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + raw); + } + + @Override + public String toString() { + return Utils.toString(CreateSalesReceiptResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private UnifiedId data; + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public Builder data(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public CreateSalesReceiptResponse build() { + + return new CreateSalesReceiptResponse( + statusCode, status, service, + resource, operation, data, + raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/CustomField1.java b/src/main/java/com/apideck/unify/models/components/CustomField1.java index d606f1507..10014d8a5 100644 --- a/src/main/java/com/apideck/unify/models/components/CustomField1.java +++ b/src/main/java/com/apideck/unify/models/components/CustomField1.java @@ -31,6 +31,14 @@ public class CustomField1 { @JsonProperty("name") private JsonNullable name; + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ref_name") + private JsonNullable refName; + /** * More information about the custom field */ @@ -47,21 +55,24 @@ public class CustomField1 { public CustomField1( @JsonProperty("id") Optional id, @JsonProperty("name") JsonNullable name, + @JsonProperty("ref_name") JsonNullable refName, @JsonProperty("description") JsonNullable description, @JsonProperty("value") JsonNullable value) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(name, "name"); + Utils.checkNotNull(refName, "refName"); Utils.checkNotNull(description, "description"); Utils.checkNotNull(value, "value"); this.id = id; this.name = name; + this.refName = refName; this.description = description; this.value = value; } public CustomField1() { this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -80,6 +91,15 @@ public JsonNullable name() { return name; } + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + @JsonIgnore + public JsonNullable refName() { + return refName; + } + /** * More information about the custom field */ @@ -136,6 +156,26 @@ public CustomField1 withName(JsonNullable name) { return this; } + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public CustomField1 withRefName(String refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = JsonNullable.of(refName); + return this; + } + + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public CustomField1 withRefName(JsonNullable refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = refName; + return this; + } + /** * More information about the custom field */ @@ -178,6 +218,7 @@ public boolean equals(java.lang.Object o) { return Utils.enhancedDeepEquals(this.id, other.id) && Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.refName, other.refName) && Utils.enhancedDeepEquals(this.description, other.description) && Utils.enhancedDeepEquals(this.value, other.value); } @@ -185,8 +226,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, name, description, - value); + id, name, refName, + description, value); } @Override @@ -194,6 +235,7 @@ public String toString() { return Utils.toString(CustomField1.class, "id", id, "name", name, + "refName", refName, "description", description, "value", value); } @@ -205,6 +247,8 @@ public final static class Builder { private JsonNullable name = JsonNullable.undefined(); + private JsonNullable refName = JsonNullable.undefined(); + private JsonNullable description = JsonNullable.undefined(); private JsonNullable value = JsonNullable.undefined(); @@ -252,6 +296,27 @@ public Builder name(JsonNullable name) { } + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public Builder refName(String refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = JsonNullable.of(refName); + return this; + } + + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public Builder refName(JsonNullable refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = refName; + return this; + } + + /** * More information about the custom field */ @@ -286,8 +351,8 @@ public Builder value(JsonNullable value) { public CustomField1 build() { return new CustomField1( - id, name, description, - value); + id, name, refName, + description, value); } } diff --git a/src/main/java/com/apideck/unify/models/components/CustomField2.java b/src/main/java/com/apideck/unify/models/components/CustomField2.java index e984d1abb..c56b06d84 100644 --- a/src/main/java/com/apideck/unify/models/components/CustomField2.java +++ b/src/main/java/com/apideck/unify/models/components/CustomField2.java @@ -31,6 +31,14 @@ public class CustomField2 { @JsonProperty("name") private Optional name; + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ref_name") + private JsonNullable refName; + /** * More information about the custom field */ @@ -47,21 +55,24 @@ public class CustomField2 { public CustomField2( @JsonProperty("id") JsonNullable id, @JsonProperty("name") Optional name, + @JsonProperty("ref_name") JsonNullable refName, @JsonProperty("description") JsonNullable description, @JsonProperty("value") JsonNullable value) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(name, "name"); + Utils.checkNotNull(refName, "refName"); Utils.checkNotNull(description, "description"); Utils.checkNotNull(value, "value"); this.id = id; this.name = name; + this.refName = refName; this.description = description; this.value = value; } public CustomField2() { this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), - JsonNullable.undefined()); + JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -80,6 +91,15 @@ public Optional name() { return name; } + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + @JsonIgnore + public JsonNullable refName() { + return refName; + } + /** * More information about the custom field */ @@ -136,6 +156,26 @@ public CustomField2 withName(Optional name) { return this; } + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public CustomField2 withRefName(String refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = JsonNullable.of(refName); + return this; + } + + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public CustomField2 withRefName(JsonNullable refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = refName; + return this; + } + /** * More information about the custom field */ @@ -178,6 +218,7 @@ public boolean equals(java.lang.Object o) { return Utils.enhancedDeepEquals(this.id, other.id) && Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.refName, other.refName) && Utils.enhancedDeepEquals(this.description, other.description) && Utils.enhancedDeepEquals(this.value, other.value); } @@ -185,8 +226,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, name, description, - value); + id, name, refName, + description, value); } @Override @@ -194,6 +235,7 @@ public String toString() { return Utils.toString(CustomField2.class, "id", id, "name", name, + "refName", refName, "description", description, "value", value); } @@ -205,6 +247,8 @@ public final static class Builder { private Optional name = Optional.empty(); + private JsonNullable refName = JsonNullable.undefined(); + private JsonNullable description = JsonNullable.undefined(); private JsonNullable value = JsonNullable.undefined(); @@ -252,6 +296,27 @@ public Builder name(Optional name) { } + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public Builder refName(String refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = JsonNullable.of(refName); + return this; + } + + /** + * Display name of the record a reference-type custom field points at. `value` carries that record's + * id; this carries its human-readable name, so a consumer does not need a second lookup to render it. + */ + public Builder refName(JsonNullable refName) { + Utils.checkNotNull(refName, "refName"); + this.refName = refName; + return this; + } + + /** * More information about the custom field */ @@ -286,8 +351,8 @@ public Builder value(JsonNullable value) { public CustomField2 build() { return new CustomField2( - id, name, description, - value); + id, name, refName, + description, value); } } diff --git a/src/main/java/com/apideck/unify/models/components/DeletePaymentMethodResponse.java b/src/main/java/com/apideck/unify/models/components/DeletePaymentMethodResponse.java new file mode 100644 index 000000000..b9bb8c395 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/DeletePaymentMethodResponse.java @@ -0,0 +1,388 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * DeletePaymentMethodResponse + * + *

Payment Methods + */ +public class DeletePaymentMethodResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonProperty("data") + private UnifiedId data; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public DeletePaymentMethodResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") UnifiedId data, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.raw = raw; + } + + public DeletePaymentMethodResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + UnifiedId data) { + this(statusCode, status, service, + resource, operation, data, + JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonIgnore + public UnifiedId data() { + return data; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public DeletePaymentMethodResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public DeletePaymentMethodResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public DeletePaymentMethodResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public DeletePaymentMethodResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public DeletePaymentMethodResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public DeletePaymentMethodResponse withData(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public DeletePaymentMethodResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public DeletePaymentMethodResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePaymentMethodResponse other = (DeletePaymentMethodResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + raw); + } + + @Override + public String toString() { + return Utils.toString(DeletePaymentMethodResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private UnifiedId data; + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public Builder data(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public DeletePaymentMethodResponse build() { + + return new DeletePaymentMethodResponse( + statusCode, status, service, + resource, operation, data, + raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/DeleteSalesReceiptResponse.java b/src/main/java/com/apideck/unify/models/components/DeleteSalesReceiptResponse.java new file mode 100644 index 000000000..73edd9212 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/DeleteSalesReceiptResponse.java @@ -0,0 +1,388 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * DeleteSalesReceiptResponse + * + *

SalesReceipt deleted + */ +public class DeleteSalesReceiptResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonProperty("data") + private UnifiedId data; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public DeleteSalesReceiptResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") UnifiedId data, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.raw = raw; + } + + public DeleteSalesReceiptResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + UnifiedId data) { + this(statusCode, status, service, + resource, operation, data, + JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonIgnore + public UnifiedId data() { + return data; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public DeleteSalesReceiptResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public DeleteSalesReceiptResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public DeleteSalesReceiptResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public DeleteSalesReceiptResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public DeleteSalesReceiptResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public DeleteSalesReceiptResponse withData(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public DeleteSalesReceiptResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public DeleteSalesReceiptResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSalesReceiptResponse other = (DeleteSalesReceiptResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + raw); + } + + @Override + public String toString() { + return Utils.toString(DeleteSalesReceiptResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private UnifiedId data; + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public Builder data(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public DeleteSalesReceiptResponse build() { + + return new DeleteSalesReceiptResponse( + statusCode, status, service, + resource, operation, data, + raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/GetPaymentMethodResponse.java b/src/main/java/com/apideck/unify/models/components/GetPaymentMethodResponse.java new file mode 100644 index 000000000..4140837a3 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/GetPaymentMethodResponse.java @@ -0,0 +1,439 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * GetPaymentMethodResponse + * + *

Payment Methods + */ +public class GetPaymentMethodResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + + @JsonProperty("data") + private AccountingPaymentMethod data; + + /** + * Response metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("meta") + private Optional meta; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public GetPaymentMethodResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") AccountingPaymentMethod data, + @JsonProperty("meta") Optional meta, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(meta, "meta"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.meta = meta; + this.raw = raw; + } + + public GetPaymentMethodResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + AccountingPaymentMethod data) { + this(statusCode, status, service, + resource, operation, data, + Optional.empty(), JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + @JsonIgnore + public AccountingPaymentMethod data() { + return data; + } + + /** + * Response metadata + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional meta() { + return (Optional) meta; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public GetPaymentMethodResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public GetPaymentMethodResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public GetPaymentMethodResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public GetPaymentMethodResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public GetPaymentMethodResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + public GetPaymentMethodResponse withData(AccountingPaymentMethod data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Response metadata + */ + public GetPaymentMethodResponse withMeta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + + /** + * Response metadata + */ + public GetPaymentMethodResponse withMeta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetPaymentMethodResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetPaymentMethodResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPaymentMethodResponse other = (GetPaymentMethodResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.meta, other.meta) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + meta, raw); + } + + @Override + public String toString() { + return Utils.toString(GetPaymentMethodResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "meta", meta, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private AccountingPaymentMethod data; + + private Optional meta = Optional.empty(); + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + public Builder data(AccountingPaymentMethod data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Response metadata + */ + public Builder meta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + /** + * Response metadata + */ + public Builder meta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public GetPaymentMethodResponse build() { + + return new GetPaymentMethodResponse( + statusCode, status, service, + resource, operation, data, + meta, raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/GetPaymentMethodsResponse.java b/src/main/java/com/apideck/unify/models/components/GetPaymentMethodsResponse.java new file mode 100644 index 000000000..05f219e28 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/GetPaymentMethodsResponse.java @@ -0,0 +1,501 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * GetPaymentMethodsResponse + * + *

Payment Methods + */ +public class GetPaymentMethodsResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + + @JsonProperty("data") + private List data; + + /** + * Response metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("meta") + private Optional meta; + + /** + * Links to navigate to previous or next pages through the API + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("links") + private Optional links; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public GetPaymentMethodsResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") List data, + @JsonProperty("meta") Optional meta, + @JsonProperty("links") Optional links, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(meta, "meta"); + Utils.checkNotNull(links, "links"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.meta = meta; + this.links = links; + this.raw = raw; + } + + public GetPaymentMethodsResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + List data) { + this(statusCode, status, service, + resource, operation, data, + Optional.empty(), Optional.empty(), JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + @JsonIgnore + public List data() { + return data; + } + + /** + * Response metadata + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional meta() { + return (Optional) meta; + } + + /** + * Links to navigate to previous or next pages through the API + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional links() { + return (Optional) links; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public GetPaymentMethodsResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public GetPaymentMethodsResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public GetPaymentMethodsResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public GetPaymentMethodsResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public GetPaymentMethodsResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + public GetPaymentMethodsResponse withData(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Response metadata + */ + public GetPaymentMethodsResponse withMeta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + + /** + * Response metadata + */ + public GetPaymentMethodsResponse withMeta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + /** + * Links to navigate to previous or next pages through the API + */ + public GetPaymentMethodsResponse withLinks(Links links) { + Utils.checkNotNull(links, "links"); + this.links = Optional.ofNullable(links); + return this; + } + + + /** + * Links to navigate to previous or next pages through the API + */ + public GetPaymentMethodsResponse withLinks(Optional links) { + Utils.checkNotNull(links, "links"); + this.links = links; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetPaymentMethodsResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetPaymentMethodsResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPaymentMethodsResponse other = (GetPaymentMethodsResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.meta, other.meta) && + Utils.enhancedDeepEquals(this.links, other.links) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + meta, links, raw); + } + + @Override + public String toString() { + return Utils.toString(GetPaymentMethodsResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "meta", meta, + "links", links, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private List data; + + private Optional meta = Optional.empty(); + + private Optional links = Optional.empty(); + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + public Builder data(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Response metadata + */ + public Builder meta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + /** + * Response metadata + */ + public Builder meta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + + /** + * Links to navigate to previous or next pages through the API + */ + public Builder links(Links links) { + Utils.checkNotNull(links, "links"); + this.links = Optional.ofNullable(links); + return this; + } + + /** + * Links to navigate to previous or next pages through the API + */ + public Builder links(Optional links) { + Utils.checkNotNull(links, "links"); + this.links = links; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public GetPaymentMethodsResponse build() { + + return new GetPaymentMethodsResponse( + statusCode, status, service, + resource, operation, data, + meta, links, raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/GetSalesReceiptResponse.java b/src/main/java/com/apideck/unify/models/components/GetSalesReceiptResponse.java new file mode 100644 index 000000000..0fc055d35 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/GetSalesReceiptResponse.java @@ -0,0 +1,439 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * GetSalesReceiptResponse + * + *

SalesReceipt + */ +public class GetSalesReceiptResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + + @JsonProperty("data") + private SalesReceipt data; + + /** + * Response metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("meta") + private Optional meta; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public GetSalesReceiptResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") SalesReceipt data, + @JsonProperty("meta") Optional meta, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(meta, "meta"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.meta = meta; + this.raw = raw; + } + + public GetSalesReceiptResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + SalesReceipt data) { + this(statusCode, status, service, + resource, operation, data, + Optional.empty(), JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + @JsonIgnore + public SalesReceipt data() { + return data; + } + + /** + * Response metadata + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional meta() { + return (Optional) meta; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public GetSalesReceiptResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public GetSalesReceiptResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public GetSalesReceiptResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public GetSalesReceiptResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public GetSalesReceiptResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + public GetSalesReceiptResponse withData(SalesReceipt data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Response metadata + */ + public GetSalesReceiptResponse withMeta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + + /** + * Response metadata + */ + public GetSalesReceiptResponse withMeta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetSalesReceiptResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetSalesReceiptResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSalesReceiptResponse other = (GetSalesReceiptResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.meta, other.meta) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + meta, raw); + } + + @Override + public String toString() { + return Utils.toString(GetSalesReceiptResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "meta", meta, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private SalesReceipt data; + + private Optional meta = Optional.empty(); + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + public Builder data(SalesReceipt data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Response metadata + */ + public Builder meta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + /** + * Response metadata + */ + public Builder meta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public GetSalesReceiptResponse build() { + + return new GetSalesReceiptResponse( + statusCode, status, service, + resource, operation, data, + meta, raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/GetSalesReceiptsResponse.java b/src/main/java/com/apideck/unify/models/components/GetSalesReceiptsResponse.java new file mode 100644 index 000000000..a6e845e0f --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/GetSalesReceiptsResponse.java @@ -0,0 +1,501 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * GetSalesReceiptsResponse + * + *

SalesReceipts + */ +public class GetSalesReceiptsResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + + @JsonProperty("data") + private List data; + + /** + * Response metadata + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("meta") + private Optional meta; + + /** + * Links to navigate to previous or next pages through the API + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("links") + private Optional links; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public GetSalesReceiptsResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") List data, + @JsonProperty("meta") Optional meta, + @JsonProperty("links") Optional links, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(meta, "meta"); + Utils.checkNotNull(links, "links"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.meta = meta; + this.links = links; + this.raw = raw; + } + + public GetSalesReceiptsResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + List data) { + this(statusCode, status, service, + resource, operation, data, + Optional.empty(), Optional.empty(), JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + @JsonIgnore + public List data() { + return data; + } + + /** + * Response metadata + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional meta() { + return (Optional) meta; + } + + /** + * Links to navigate to previous or next pages through the API + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional links() { + return (Optional) links; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public GetSalesReceiptsResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public GetSalesReceiptsResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public GetSalesReceiptsResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public GetSalesReceiptsResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public GetSalesReceiptsResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + public GetSalesReceiptsResponse withData(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Response metadata + */ + public GetSalesReceiptsResponse withMeta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + + /** + * Response metadata + */ + public GetSalesReceiptsResponse withMeta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + /** + * Links to navigate to previous or next pages through the API + */ + public GetSalesReceiptsResponse withLinks(Links links) { + Utils.checkNotNull(links, "links"); + this.links = Optional.ofNullable(links); + return this; + } + + + /** + * Links to navigate to previous or next pages through the API + */ + public GetSalesReceiptsResponse withLinks(Optional links) { + Utils.checkNotNull(links, "links"); + this.links = links; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetSalesReceiptsResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public GetSalesReceiptsResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSalesReceiptsResponse other = (GetSalesReceiptsResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.meta, other.meta) && + Utils.enhancedDeepEquals(this.links, other.links) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + meta, links, raw); + } + + @Override + public String toString() { + return Utils.toString(GetSalesReceiptsResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "meta", meta, + "links", links, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private List data; + + private Optional meta = Optional.empty(); + + private Optional links = Optional.empty(); + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + public Builder data(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Response metadata + */ + public Builder meta(Meta meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = Optional.ofNullable(meta); + return this; + } + + /** + * Response metadata + */ + public Builder meta(Optional meta) { + Utils.checkNotNull(meta, "meta"); + this.meta = meta; + return this; + } + + + /** + * Links to navigate to previous or next pages through the API + */ + public Builder links(Links links) { + Utils.checkNotNull(links, "links"); + this.links = Optional.ofNullable(links); + return this; + } + + /** + * Links to navigate to previous or next pages through the API + */ + public Builder links(Optional links) { + Utils.checkNotNull(links, "links"); + this.links = links; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public GetSalesReceiptsResponse build() { + + return new GetSalesReceiptsResponse( + statusCode, status, service, + resource, operation, data, + meta, links, raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/Refund.java b/src/main/java/com/apideck/unify/models/components/Refund.java index 4306b4fb2..31ec95405 100644 --- a/src/main/java/com/apideck/unify/models/components/Refund.java +++ b/src/main/java/com/apideck/unify/models/components/Refund.java @@ -110,10 +110,12 @@ public class Refund { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") @@ -146,7 +148,7 @@ public class Refund { private JsonNullable account; /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -526,10 +528,12 @@ public Optional status() { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -568,7 +572,7 @@ public JsonNullable account() { } /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -956,10 +960,12 @@ public Refund withStatus(Optional status) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public Refund withType(RefundType type) { Utils.checkNotNull(type, "type"); @@ -970,10 +976,12 @@ public Refund withType(RefundType type) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public Refund withType(Optional type) { Utils.checkNotNull(type, "type"); @@ -1048,7 +1056,7 @@ public Refund withAccount(JsonNullable account) { } /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -1060,7 +1068,7 @@ public Refund withLineItems(List lineItems) { /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -1833,10 +1841,12 @@ public Builder status(Optional status) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public Builder type(RefundType type) { Utils.checkNotNull(type, "type"); @@ -1846,10 +1856,12 @@ public Builder type(RefundType type) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public Builder type(Optional type) { Utils.checkNotNull(type, "type"); @@ -1929,7 +1941,7 @@ public Builder account(JsonNullable account) { /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -1940,7 +1952,7 @@ public Builder lineItems(List lineItems) { } /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ diff --git a/src/main/java/com/apideck/unify/models/components/RefundInput.java b/src/main/java/com/apideck/unify/models/components/RefundInput.java index 98bca995d..999fa505d 100644 --- a/src/main/java/com/apideck/unify/models/components/RefundInput.java +++ b/src/main/java/com/apideck/unify/models/components/RefundInput.java @@ -102,10 +102,12 @@ public class RefundInput { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") @@ -138,7 +140,7 @@ public class RefundInput { private JsonNullable account; /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -454,10 +456,12 @@ public Optional status() { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -496,7 +500,7 @@ public JsonNullable account() { } /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -834,10 +838,12 @@ public RefundInput withStatus(Optional status) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public RefundInput withType(RefundType type) { Utils.checkNotNull(type, "type"); @@ -848,10 +854,12 @@ public RefundInput withType(RefundType type) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public RefundInput withType(Optional type) { Utils.checkNotNull(type, "type"); @@ -926,7 +934,7 @@ public RefundInput withAccount(JsonNullable accou } /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -938,7 +946,7 @@ public RefundInput withLineItems(List lineItems) { /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -1585,10 +1593,12 @@ public Builder status(Optional status) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public Builder type(RefundType type) { Utils.checkNotNull(type, "type"); @@ -1598,10 +1608,12 @@ public Builder type(RefundType type) { /** * Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public Builder type(Optional type) { Utils.checkNotNull(type, "type"); @@ -1681,7 +1693,7 @@ public Builder account(JsonNullable account) { /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ @@ -1692,7 +1704,7 @@ public Builder lineItems(List lineItems) { } /** - * Line items for itemized refunds (type: refund_receipt). Used when the refund includes + * Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes * product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite * CashRefund. */ diff --git a/src/main/java/com/apideck/unify/models/components/RefundType.java b/src/main/java/com/apideck/unify/models/components/RefundType.java index 9f7faf989..5278ba41f 100644 --- a/src/main/java/com/apideck/unify/models/components/RefundType.java +++ b/src/main/java/com/apideck/unify/models/components/RefundType.java @@ -22,16 +22,19 @@ * RefundType * *

Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO - * RefundReceipt, NetSuite CashRefund). `cash_refund` for cash-out refunds with GL distribution or - * allocations (Sage Intacct). + * RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds + * with GL distribution or allocations (Sage Intacct). * - *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). + *

`credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for + * itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite + * CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. */ public class RefundType { public static final RefundType REFUND_RECEIPT = new RefundType("refund_receipt"); public static final RefundType CASH_REFUND = new RefundType("cash_refund"); public static final RefundType CREDIT_NOTE_REFUND = new RefundType("credit_note_refund"); + public static final RefundType SALE_REFUND = new RefundType("sale_refund"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -108,6 +111,7 @@ private static final Map createValuesMap() { map.put("refund_receipt", REFUND_RECEIPT); map.put("cash_refund", CASH_REFUND); map.put("credit_note_refund", CREDIT_NOTE_REFUND); + map.put("sale_refund", SALE_REFUND); return map; } @@ -116,6 +120,7 @@ private static final Map createEnumsMap() { map.put("refund_receipt", RefundTypeEnum.REFUND_RECEIPT); map.put("cash_refund", RefundTypeEnum.CASH_REFUND); map.put("credit_note_refund", RefundTypeEnum.CREDIT_NOTE_REFUND); + map.put("sale_refund", RefundTypeEnum.SALE_REFUND); return map; } @@ -124,7 +129,8 @@ public enum RefundTypeEnum { REFUND_RECEIPT("refund_receipt"), CASH_REFUND("cash_refund"), - CREDIT_NOTE_REFUND("credit_note_refund"),; + CREDIT_NOTE_REFUND("credit_note_refund"), + SALE_REFUND("sale_refund"),; private final String value; diff --git a/src/main/java/com/apideck/unify/models/components/SalesReceipt.java b/src/main/java/com/apideck/unify/models/components/SalesReceipt.java new file mode 100644 index 000000000..a0dc28f33 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/SalesReceipt.java @@ -0,0 +1,1991 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Boolean; +import java.lang.Double; +import java.lang.Object; +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; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class SalesReceipt { + /** + * Unique identifier representing the sales receipt + */ + @JsonProperty("id") + private String id; + + /** + * Reference number for the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * The total amount of the transaction or record + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("total_amount") + private Optional totalAmount; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method") + private JsonNullable paymentMethod; + + /** + * Optional reference message returned by payment method on processing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_reference") + private JsonNullable paymentMethodReference; + + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_id") + private JsonNullable paymentMethodId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_code") + private JsonNullable taxCode; + + /** + * Discount percentage applied to this sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_percentage") + private JsonNullable discountPercentage; + + /** + * Discount amount applied to this sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_amount") + private JsonNullable discountAmount; + + /** + * Optional note to be associated with the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Customer memo + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer_memo") + private JsonNullable customerMemo; + + /** + * Optional reference message for the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("billing_address") + private Optional billingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("shipping_address") + private Optional shippingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_mappings") + private JsonNullable> customMappings; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The user who last updated the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_by") + private JsonNullable updatedBy; + + /** + * The user who created the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_by") + private JsonNullable createdBy; + + /** + * The date and time when the object was last updated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_at") + private JsonNullable updatedAt; + + /** + * The date and time when the object was created. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_at") + private JsonNullable createdAt; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public SalesReceipt( + @JsonProperty("id") String id, + @JsonProperty("number") JsonNullable number, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_amount") Optional totalAmount, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("payment_method") JsonNullable paymentMethod, + @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, + @JsonProperty("payment_method_id") JsonNullable paymentMethodId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("tax_code") JsonNullable taxCode, + @JsonProperty("discount_percentage") JsonNullable discountPercentage, + @JsonProperty("discount_amount") JsonNullable discountAmount, + @JsonProperty("note") JsonNullable note, + @JsonProperty("customer_memo") JsonNullable customerMemo, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("billing_address") Optional billingAddress, + @JsonProperty("shipping_address") Optional shippingAddress, + @JsonProperty("department") JsonNullable department, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_mappings") JsonNullable> customMappings, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("updated_by") JsonNullable updatedBy, + @JsonProperty("created_by") JsonNullable createdBy, + @JsonProperty("updated_at") JsonNullable updatedAt, + @JsonProperty("created_at") JsonNullable createdAt, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(taxCode, "taxCode"); + Utils.checkNotNull(discountPercentage, "discountPercentage"); + Utils.checkNotNull(discountAmount, "discountAmount"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(customerMemo, "customerMemo"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(billingAddress, "billingAddress"); + Utils.checkNotNull(shippingAddress, "shippingAddress"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customMappings, "customMappings"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(updatedBy, "updatedBy"); + Utils.checkNotNull(createdBy, "createdBy"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(passThrough, "passThrough"); + this.id = id; + this.number = number; + this.customer = customer; + this.currency = currency; + this.currencyRate = currencyRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalAmount = totalAmount; + this.totalTax = totalTax; + this.transactionDate = transactionDate; + this.paymentMethod = paymentMethod; + this.paymentMethodReference = paymentMethodReference; + this.paymentMethodId = paymentMethodId; + this.account = account; + this.lineItems = lineItems; + this.taxCode = taxCode; + this.discountPercentage = discountPercentage; + this.discountAmount = discountAmount; + this.note = note; + this.customerMemo = customerMemo; + this.reference = reference; + this.billingAddress = billingAddress; + this.shippingAddress = shippingAddress; + this.department = department; + this.trackingCategories = trackingCategories; + this.customMappings = customMappings; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.updatedBy = updatedBy; + this.createdBy = createdBy; + this.updatedAt = updatedAt; + this.createdAt = createdAt; + this.passThrough = passThrough; + } + + public SalesReceipt( + String id) { + this(id, JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); + } + + /** + * Unique identifier representing the sales receipt + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * Reference number for the sales receipt. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * The total amount of the transaction or record + */ + @JsonIgnore + public Optional totalAmount() { + return totalAmount; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonIgnore + public JsonNullable paymentMethod() { + return paymentMethod; + } + + /** + * Optional reference message returned by payment method on processing + */ + @JsonIgnore + public JsonNullable paymentMethodReference() { + return paymentMethodReference; + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable paymentMethodId() { + return paymentMethodId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonIgnore + public JsonNullable taxCode() { + return taxCode; + } + + /** + * Discount percentage applied to this sales receipt. + */ + @JsonIgnore + public JsonNullable discountPercentage() { + return discountPercentage; + } + + /** + * Discount amount applied to this sales receipt. + */ + @JsonIgnore + public JsonNullable discountAmount() { + return discountAmount; + } + + /** + * Optional note to be associated with the sales receipt. + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Customer memo + */ + @JsonIgnore + public JsonNullable customerMemo() { + return customerMemo; + } + + /** + * Optional reference message for the sales receipt. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional

billingAddress() { + return (Optional
) billingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional
shippingAddress() { + return (Optional
) shippingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> customMappings() { + return (JsonNullable>) customMappings; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The user who last updated the object. + */ + @JsonIgnore + public JsonNullable updatedBy() { + return updatedBy; + } + + /** + * The user who created the object. + */ + @JsonIgnore + public JsonNullable createdBy() { + return createdBy; + } + + /** + * The date and time when the object was last updated. + */ + @JsonIgnore + public JsonNullable updatedAt() { + return updatedAt; + } + + /** + * The date and time when the object was created. + */ + @JsonIgnore + public JsonNullable createdAt() { + return createdAt; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique identifier representing the sales receipt + */ + public SalesReceipt withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Reference number for the sales receipt. + */ + public SalesReceipt withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the sales receipt. + */ + public SalesReceipt withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The customer this entity is linked to. + */ + public SalesReceipt withCustomer(LinkedCustomer customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public SalesReceipt withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public SalesReceipt withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public SalesReceipt withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public SalesReceipt withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public SalesReceipt withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * Amounts are including tax + */ + public SalesReceipt withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public SalesReceipt withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public SalesReceipt withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public SalesReceipt withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * The total amount of the transaction or record + */ + public SalesReceipt withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = Optional.ofNullable(totalAmount); + return this; + } + + + /** + * The total amount of the transaction or record + */ + public SalesReceipt withTotalAmount(Optional totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public SalesReceipt withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public SalesReceipt withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public SalesReceipt withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public SalesReceipt withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public SalesReceipt withPaymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public SalesReceipt withPaymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public SalesReceipt withPaymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public SalesReceipt withPaymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + /** + * A unique identifier for an object. + */ + public SalesReceipt withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public SalesReceipt withPaymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public SalesReceipt withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public SalesReceipt withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public SalesReceipt withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public SalesReceipt withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public SalesReceipt withTaxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public SalesReceipt withTaxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public SalesReceipt withDiscountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public SalesReceipt withDiscountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public SalesReceipt withDiscountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public SalesReceipt withDiscountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public SalesReceipt withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public SalesReceipt withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Customer memo + */ + public SalesReceipt withCustomerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public SalesReceipt withCustomerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public SalesReceipt withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public SalesReceipt withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + public SalesReceipt withBillingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + + public SalesReceipt withBillingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + public SalesReceipt withShippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + + public SalesReceipt withShippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + public SalesReceipt withDepartment(LinkedDepartment department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public SalesReceipt withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + /** + * A list of linked tracking categories. + */ + public SalesReceipt withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public SalesReceipt withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public SalesReceipt withCustomMappings(Map customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = JsonNullable.of(customMappings); + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public SalesReceipt withCustomMappings(JsonNullable> customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = customMappings; + return this; + } + + public SalesReceipt withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public SalesReceipt withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public SalesReceipt withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public SalesReceipt withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The user who last updated the object. + */ + public SalesReceipt withUpdatedBy(String updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * The user who last updated the object. + */ + public SalesReceipt withUpdatedBy(JsonNullable updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = updatedBy; + return this; + } + + /** + * The user who created the object. + */ + public SalesReceipt withCreatedBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * The user who created the object. + */ + public SalesReceipt withCreatedBy(JsonNullable createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + /** + * The date and time when the object was last updated. + */ + public SalesReceipt withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * The date and time when the object was last updated. + */ + public SalesReceipt withUpdatedAt(JsonNullable updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The date and time when the object was created. + */ + public SalesReceipt withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = JsonNullable.of(createdAt); + return this; + } + + /** + * The date and time when the object was created. + */ + public SalesReceipt withCreatedAt(JsonNullable createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public SalesReceipt withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public SalesReceipt withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SalesReceipt other = (SalesReceipt) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod) && + Utils.enhancedDeepEquals(this.paymentMethodReference, other.paymentMethodReference) && + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.taxCode, other.taxCode) && + Utils.enhancedDeepEquals(this.discountPercentage, other.discountPercentage) && + Utils.enhancedDeepEquals(this.discountAmount, other.discountAmount) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.customerMemo, other.customerMemo) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.billingAddress, other.billingAddress) && + Utils.enhancedDeepEquals(this.shippingAddress, other.shippingAddress) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customMappings, other.customMappings) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.createdBy, other.createdBy) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, number, customer, + currency, currencyRate, taxInclusive, + subTotal, totalAmount, totalTax, + transactionDate, paymentMethod, paymentMethodReference, + paymentMethodId, account, lineItems, + taxCode, discountPercentage, discountAmount, + note, customerMemo, reference, + billingAddress, shippingAddress, department, + trackingCategories, customMappings, customFields, + rowVersion, updatedBy, createdBy, + updatedAt, createdAt, passThrough); + } + + @Override + public String toString() { + return Utils.toString(SalesReceipt.class, + "id", id, + "number", number, + "customer", customer, + "currency", currency, + "currencyRate", currencyRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalAmount", totalAmount, + "totalTax", totalTax, + "transactionDate", transactionDate, + "paymentMethod", paymentMethod, + "paymentMethodReference", paymentMethodReference, + "paymentMethodId", paymentMethodId, + "account", account, + "lineItems", lineItems, + "taxCode", taxCode, + "discountPercentage", discountPercentage, + "discountAmount", discountAmount, + "note", note, + "customerMemo", customerMemo, + "reference", reference, + "billingAddress", billingAddress, + "shippingAddress", shippingAddress, + "department", department, + "trackingCategories", trackingCategories, + "customMappings", customMappings, + "customFields", customFields, + "rowVersion", rowVersion, + "updatedBy", updatedBy, + "createdBy", createdBy, + "updatedAt", updatedAt, + "createdAt", createdAt, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private Optional totalAmount = Optional.empty(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + private JsonNullable paymentMethod = JsonNullable.undefined(); + + private JsonNullable paymentMethodReference = JsonNullable.undefined(); + + private JsonNullable paymentMethodId = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private JsonNullable taxCode = JsonNullable.undefined(); + + private JsonNullable discountPercentage = JsonNullable.undefined(); + + private JsonNullable discountAmount = JsonNullable.undefined(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable customerMemo = JsonNullable.undefined(); + + private JsonNullable reference = JsonNullable.undefined(); + + private Optional billingAddress = Optional.empty(); + + private Optional shippingAddress = Optional.empty(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private JsonNullable> customMappings = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private JsonNullable updatedBy = JsonNullable.undefined(); + + private JsonNullable createdBy = JsonNullable.undefined(); + + private JsonNullable updatedAt = JsonNullable.undefined(); + + private JsonNullable createdAt = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Unique identifier representing the sales receipt + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Reference number for the sales receipt. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the sales receipt. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomer customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = Optional.ofNullable(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(Optional totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + + /** + * Discount percentage applied to this sales receipt. + */ + public Builder discountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public Builder discountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + + /** + * Discount amount applied to this sales receipt. + */ + public Builder discountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public Builder discountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + + /** + * Optional note to be associated with the sales receipt. + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Customer memo + */ + public Builder customerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public Builder customerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + + /** + * Optional reference message for the sales receipt. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + public Builder billingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + public Builder billingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + + public Builder shippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + public Builder shippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + + public Builder department(LinkedDepartment department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Builder customMappings(Map customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = JsonNullable.of(customMappings); + return this; + } + + /** + * When custom mappings are configured on the resource, the result is included here. + */ + public Builder customMappings(JsonNullable> customMappings) { + Utils.checkNotNull(customMappings, "customMappings"); + this.customMappings = customMappings; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The user who last updated the object. + */ + public Builder updatedBy(String updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * The user who last updated the object. + */ + public Builder updatedBy(JsonNullable updatedBy) { + Utils.checkNotNull(updatedBy, "updatedBy"); + this.updatedBy = updatedBy; + return this; + } + + + /** + * The user who created the object. + */ + public Builder createdBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = JsonNullable.of(createdBy); + return this; + } + + /** + * The user who created the object. + */ + public Builder createdBy(JsonNullable createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + + /** + * The date and time when the object was last updated. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + /** + * The date and time when the object was last updated. + */ + public Builder updatedAt(JsonNullable updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + + /** + * The date and time when the object was created. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = JsonNullable.of(createdAt); + return this; + } + + /** + * The date and time when the object was created. + */ + public Builder createdAt(JsonNullable createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public SalesReceipt build() { + + return new SalesReceipt( + id, number, customer, + currency, currencyRate, taxInclusive, + subTotal, totalAmount, totalTax, + transactionDate, paymentMethod, paymentMethodReference, + paymentMethodId, account, lineItems, + taxCode, discountPercentage, discountAmount, + note, customerMemo, reference, + billingAddress, shippingAddress, department, + trackingCategories, customMappings, customFields, + rowVersion, updatedBy, createdBy, + updatedAt, createdAt, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/SalesReceiptInput.java b/src/main/java/com/apideck/unify/models/components/SalesReceiptInput.java new file mode 100644 index 000000000..18eb21ae8 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/SalesReceiptInput.java @@ -0,0 +1,1646 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class SalesReceiptInput { + /** + * Reference number for the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * The total amount of the transaction or record + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("total_amount") + private Optional totalAmount; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method") + private JsonNullable paymentMethod; + + /** + * Optional reference message returned by payment method on processing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_reference") + private JsonNullable paymentMethodReference; + + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_id") + private JsonNullable paymentMethodId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_code") + private JsonNullable taxCode; + + /** + * Discount percentage applied to this sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_percentage") + private JsonNullable discountPercentage; + + /** + * Discount amount applied to this sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_amount") + private JsonNullable discountAmount; + + /** + * Optional note to be associated with the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Customer memo + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer_memo") + private JsonNullable customerMemo; + + /** + * Optional reference message for the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("billing_address") + private Optional billingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("shipping_address") + private Optional shippingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public SalesReceiptInput( + @JsonProperty("number") JsonNullable number, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_amount") Optional totalAmount, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("payment_method") JsonNullable paymentMethod, + @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, + @JsonProperty("payment_method_id") JsonNullable paymentMethodId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("tax_code") JsonNullable taxCode, + @JsonProperty("discount_percentage") JsonNullable discountPercentage, + @JsonProperty("discount_amount") JsonNullable discountAmount, + @JsonProperty("note") JsonNullable note, + @JsonProperty("customer_memo") JsonNullable customerMemo, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("billing_address") Optional billingAddress, + @JsonProperty("shipping_address") Optional shippingAddress, + @JsonProperty("department") JsonNullable department, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(taxCode, "taxCode"); + Utils.checkNotNull(discountPercentage, "discountPercentage"); + Utils.checkNotNull(discountAmount, "discountAmount"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(customerMemo, "customerMemo"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(billingAddress, "billingAddress"); + Utils.checkNotNull(shippingAddress, "shippingAddress"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.number = number; + this.customer = customer; + this.currency = currency; + this.currencyRate = currencyRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalAmount = totalAmount; + this.totalTax = totalTax; + this.transactionDate = transactionDate; + this.paymentMethod = paymentMethod; + this.paymentMethodReference = paymentMethodReference; + this.paymentMethodId = paymentMethodId; + this.account = account; + this.lineItems = lineItems; + this.taxCode = taxCode; + this.discountPercentage = discountPercentage; + this.discountAmount = discountAmount; + this.note = note; + this.customerMemo = customerMemo; + this.reference = reference; + this.billingAddress = billingAddress; + this.shippingAddress = shippingAddress; + this.department = department; + this.trackingCategories = trackingCategories; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public SalesReceiptInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), Optional.empty()); + } + + /** + * Reference number for the sales receipt. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * The total amount of the transaction or record + */ + @JsonIgnore + public Optional totalAmount() { + return totalAmount; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonIgnore + public JsonNullable paymentMethod() { + return paymentMethod; + } + + /** + * Optional reference message returned by payment method on processing + */ + @JsonIgnore + public JsonNullable paymentMethodReference() { + return paymentMethodReference; + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable paymentMethodId() { + return paymentMethodId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonIgnore + public JsonNullable taxCode() { + return taxCode; + } + + /** + * Discount percentage applied to this sales receipt. + */ + @JsonIgnore + public JsonNullable discountPercentage() { + return discountPercentage; + } + + /** + * Discount amount applied to this sales receipt. + */ + @JsonIgnore + public JsonNullable discountAmount() { + return discountAmount; + } + + /** + * Optional note to be associated with the sales receipt. + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Customer memo + */ + @JsonIgnore + public JsonNullable customerMemo() { + return customerMemo; + } + + /** + * Optional reference message for the sales receipt. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional
billingAddress() { + return (Optional
) billingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional
shippingAddress() { + return (Optional
) shippingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Reference number for the sales receipt. + */ + public SalesReceiptInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the sales receipt. + */ + public SalesReceiptInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The customer this entity is linked to. + */ + public SalesReceiptInput withCustomer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public SalesReceiptInput withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public SalesReceiptInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public SalesReceiptInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public SalesReceiptInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public SalesReceiptInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * Amounts are including tax + */ + public SalesReceiptInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public SalesReceiptInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public SalesReceiptInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public SalesReceiptInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * The total amount of the transaction or record + */ + public SalesReceiptInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = Optional.ofNullable(totalAmount); + return this; + } + + + /** + * The total amount of the transaction or record + */ + public SalesReceiptInput withTotalAmount(Optional totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public SalesReceiptInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public SalesReceiptInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public SalesReceiptInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public SalesReceiptInput withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public SalesReceiptInput withPaymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public SalesReceiptInput withPaymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public SalesReceiptInput withPaymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public SalesReceiptInput withPaymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + /** + * A unique identifier for an object. + */ + public SalesReceiptInput withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public SalesReceiptInput withPaymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public SalesReceiptInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public SalesReceiptInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public SalesReceiptInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public SalesReceiptInput withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public SalesReceiptInput withTaxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public SalesReceiptInput withTaxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public SalesReceiptInput withDiscountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public SalesReceiptInput withDiscountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public SalesReceiptInput withDiscountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public SalesReceiptInput withDiscountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public SalesReceiptInput withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public SalesReceiptInput withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Customer memo + */ + public SalesReceiptInput withCustomerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public SalesReceiptInput withCustomerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public SalesReceiptInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public SalesReceiptInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + public SalesReceiptInput withBillingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + + public SalesReceiptInput withBillingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + public SalesReceiptInput withShippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + + public SalesReceiptInput withShippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + public SalesReceiptInput withDepartment(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public SalesReceiptInput withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + /** + * A list of linked tracking categories. + */ + public SalesReceiptInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public SalesReceiptInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + public SalesReceiptInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public SalesReceiptInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public SalesReceiptInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public SalesReceiptInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public SalesReceiptInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public SalesReceiptInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SalesReceiptInput other = (SalesReceiptInput) o; + return + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod) && + Utils.enhancedDeepEquals(this.paymentMethodReference, other.paymentMethodReference) && + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.taxCode, other.taxCode) && + Utils.enhancedDeepEquals(this.discountPercentage, other.discountPercentage) && + Utils.enhancedDeepEquals(this.discountAmount, other.discountAmount) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.customerMemo, other.customerMemo) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.billingAddress, other.billingAddress) && + Utils.enhancedDeepEquals(this.shippingAddress, other.shippingAddress) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + number, customer, currency, + currencyRate, taxInclusive, subTotal, + totalAmount, totalTax, transactionDate, + paymentMethod, paymentMethodReference, paymentMethodId, + account, lineItems, taxCode, + discountPercentage, discountAmount, note, + customerMemo, reference, billingAddress, + shippingAddress, department, trackingCategories, + customFields, rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(SalesReceiptInput.class, + "number", number, + "customer", customer, + "currency", currency, + "currencyRate", currencyRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalAmount", totalAmount, + "totalTax", totalTax, + "transactionDate", transactionDate, + "paymentMethod", paymentMethod, + "paymentMethodReference", paymentMethodReference, + "paymentMethodId", paymentMethodId, + "account", account, + "lineItems", lineItems, + "taxCode", taxCode, + "discountPercentage", discountPercentage, + "discountAmount", discountAmount, + "note", note, + "customerMemo", customerMemo, + "reference", reference, + "billingAddress", billingAddress, + "shippingAddress", shippingAddress, + "department", department, + "trackingCategories", trackingCategories, + "customFields", customFields, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private Optional totalAmount = Optional.empty(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + private JsonNullable paymentMethod = JsonNullable.undefined(); + + private JsonNullable paymentMethodReference = JsonNullable.undefined(); + + private JsonNullable paymentMethodId = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private JsonNullable taxCode = JsonNullable.undefined(); + + private JsonNullable discountPercentage = JsonNullable.undefined(); + + private JsonNullable discountAmount = JsonNullable.undefined(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable customerMemo = JsonNullable.undefined(); + + private JsonNullable reference = JsonNullable.undefined(); + + private Optional billingAddress = Optional.empty(); + + private Optional shippingAddress = Optional.empty(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Reference number for the sales receipt. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the sales receipt. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = Optional.ofNullable(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(Optional totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + + /** + * Discount percentage applied to this sales receipt. + */ + public Builder discountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public Builder discountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + + /** + * Discount amount applied to this sales receipt. + */ + public Builder discountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public Builder discountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + + /** + * Optional note to be associated with the sales receipt. + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Customer memo + */ + public Builder customerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public Builder customerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + + /** + * Optional reference message for the sales receipt. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + public Builder billingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + public Builder billingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + + public Builder shippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + public Builder shippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + + public Builder department(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public SalesReceiptInput build() { + + return new SalesReceiptInput( + number, customer, currency, + currencyRate, taxInclusive, subTotal, + totalAmount, totalTax, transactionDate, + paymentMethod, paymentMethodReference, paymentMethodId, + account, lineItems, taxCode, + discountPercentage, discountAmount, note, + customerMemo, reference, billingAddress, + shippingAddress, department, trackingCategories, + customFields, rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/SalesReceiptsFilter.java b/src/main/java/com/apideck/unify/models/components/SalesReceiptsFilter.java new file mode 100644 index 000000000..36b93db0a --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/SalesReceiptsFilter.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; + + +public class SalesReceiptsFilter { + + @SpeakeasyMetadata("queryParam:name=updated_since") + private Optional updatedSince; + + /** + * Filter by customer id + */ + @SpeakeasyMetadata("queryParam:name=customer_id") + private Optional customerId; + + @JsonCreator + public SalesReceiptsFilter( + Optional updatedSince, + Optional customerId) { + Utils.checkNotNull(updatedSince, "updatedSince"); + Utils.checkNotNull(customerId, "customerId"); + this.updatedSince = updatedSince; + this.customerId = customerId; + } + + public SalesReceiptsFilter() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional updatedSince() { + return updatedSince; + } + + /** + * Filter by customer id + */ + @JsonIgnore + public Optional customerId() { + return customerId; + } + + public static Builder builder() { + return new Builder(); + } + + + public SalesReceiptsFilter withUpdatedSince(OffsetDateTime updatedSince) { + Utils.checkNotNull(updatedSince, "updatedSince"); + this.updatedSince = Optional.ofNullable(updatedSince); + return this; + } + + + public SalesReceiptsFilter withUpdatedSince(Optional updatedSince) { + Utils.checkNotNull(updatedSince, "updatedSince"); + this.updatedSince = updatedSince; + return this; + } + + /** + * Filter by customer id + */ + public SalesReceiptsFilter withCustomerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = Optional.ofNullable(customerId); + return this; + } + + + /** + * Filter by customer id + */ + public SalesReceiptsFilter withCustomerId(Optional customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SalesReceiptsFilter other = (SalesReceiptsFilter) o; + return + Utils.enhancedDeepEquals(this.updatedSince, other.updatedSince) && + Utils.enhancedDeepEquals(this.customerId, other.customerId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + updatedSince, customerId); + } + + @Override + public String toString() { + return Utils.toString(SalesReceiptsFilter.class, + "updatedSince", updatedSince, + "customerId", customerId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional updatedSince = Optional.empty(); + + private Optional customerId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + public Builder updatedSince(OffsetDateTime updatedSince) { + Utils.checkNotNull(updatedSince, "updatedSince"); + this.updatedSince = Optional.ofNullable(updatedSince); + return this; + } + + public Builder updatedSince(Optional updatedSince) { + Utils.checkNotNull(updatedSince, "updatedSince"); + this.updatedSince = updatedSince; + return this; + } + + + /** + * Filter by customer id + */ + public Builder customerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = Optional.ofNullable(customerId); + return this; + } + + /** + * Filter by customer id + */ + public Builder customerId(Optional customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + public SalesReceiptsFilter build() { + + return new SalesReceiptsFilter( + updatedSince, customerId); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/SalesReceiptsSort.java b/src/main/java/com/apideck/unify/models/components/SalesReceiptsSort.java new file mode 100644 index 000000000..fed6a416c --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/SalesReceiptsSort.java @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + + +public class SalesReceiptsSort { + /** + * The field on which to sort the Sales Receipts. + */ + @SpeakeasyMetadata("queryParam:name=by") + private Optional by; + + /** + * The direction in which to sort the results + */ + @SpeakeasyMetadata("queryParam:name=direction") + private Optional direction; + + @JsonCreator + public SalesReceiptsSort( + Optional by, + Optional direction) { + Utils.checkNotNull(by, "by"); + Utils.checkNotNull(direction, "direction"); + this.by = by; + this.direction = direction; + } + + public SalesReceiptsSort() { + this(Optional.empty(), Optional.empty()); + } + + /** + * The field on which to sort the Sales Receipts. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional by() { + return (Optional) by; + } + + /** + * The direction in which to sort the results + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional direction() { + return (Optional) direction; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The field on which to sort the Sales Receipts. + */ + public SalesReceiptsSort withBy(SalesReceiptsSortBy by) { + Utils.checkNotNull(by, "by"); + this.by = Optional.ofNullable(by); + return this; + } + + + /** + * The field on which to sort the Sales Receipts. + */ + public SalesReceiptsSort withBy(Optional by) { + Utils.checkNotNull(by, "by"); + this.by = by; + return this; + } + + /** + * The direction in which to sort the results + */ + public SalesReceiptsSort withDirection(SortDirection direction) { + Utils.checkNotNull(direction, "direction"); + this.direction = Optional.ofNullable(direction); + return this; + } + + + /** + * The direction in which to sort the results + */ + public SalesReceiptsSort withDirection(Optional direction) { + Utils.checkNotNull(direction, "direction"); + this.direction = direction; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SalesReceiptsSort other = (SalesReceiptsSort) o; + return + Utils.enhancedDeepEquals(this.by, other.by) && + Utils.enhancedDeepEquals(this.direction, other.direction); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + by, direction); + } + + @Override + public String toString() { + return Utils.toString(SalesReceiptsSort.class, + "by", by, + "direction", direction); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional by = Optional.empty(); + + private Optional direction; + + private Builder() { + // force use of static builder() method + } + + + /** + * The field on which to sort the Sales Receipts. + */ + public Builder by(SalesReceiptsSortBy by) { + Utils.checkNotNull(by, "by"); + this.by = Optional.ofNullable(by); + return this; + } + + /** + * The field on which to sort the Sales Receipts. + */ + public Builder by(Optional by) { + Utils.checkNotNull(by, "by"); + this.by = by; + return this; + } + + + /** + * The direction in which to sort the results + */ + public Builder direction(SortDirection direction) { + Utils.checkNotNull(direction, "direction"); + this.direction = Optional.ofNullable(direction); + return this; + } + + /** + * The direction in which to sort the results + */ + public Builder direction(Optional direction) { + Utils.checkNotNull(direction, "direction"); + this.direction = direction; + return this; + } + + public SalesReceiptsSort build() { + if (direction == null) { + direction = _SINGLETON_VALUE_Direction.value(); + } + + return new SalesReceiptsSort( + by, direction); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Direction = + new LazySingletonValue<>( + "direction", + "\"asc\"", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/components/SalesReceiptsSortBy.java b/src/main/java/com/apideck/unify/models/components/SalesReceiptsSortBy.java new file mode 100644 index 000000000..63d0ba80a --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/SalesReceiptsSortBy.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +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. + */ +/** + * SalesReceiptsSortBy + * + *

The field on which to sort the Sales Receipts. + */ +public class SalesReceiptsSortBy { + + public static final SalesReceiptsSortBy UPDATED_AT = new SalesReceiptsSortBy("updated_at"); + public static final SalesReceiptsSortBy CREATED_AT = new SalesReceiptsSortBy("created_at"); + + // 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 SalesReceiptsSortBy(String value) { + this.value = value; + } + + /** + * Returns a SalesReceiptsSortBy 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 SalesReceiptsSortBy + */ + @JsonCreator + public static SalesReceiptsSortBy of(String value) { + synchronized (SalesReceiptsSortBy.class) { + return values.computeIfAbsent(value, v -> new SalesReceiptsSortBy(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; + SalesReceiptsSortBy other = (SalesReceiptsSortBy) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "SalesReceiptsSortBy [value=" + value + "]"; + } + + // return an array just like an enum + public static SalesReceiptsSortBy[] values() { + synchronized (SalesReceiptsSortBy.class) { + return values.values().toArray(new SalesReceiptsSortBy[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("updated_at", UPDATED_AT); + map.put("created_at", CREATED_AT); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("updated_at", SalesReceiptsSortByEnum.UPDATED_AT); + map.put("created_at", SalesReceiptsSortByEnum.CREATED_AT); + return map; + } + + + public enum SalesReceiptsSortByEnum { + + UPDATED_AT("updated_at"), + CREATED_AT("created_at"),; + + private final String value; + + private SalesReceiptsSortByEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/Transactions.java b/src/main/java/com/apideck/unify/models/components/Transactions.java index 51f2307c4..0c76515f2 100644 --- a/src/main/java/com/apideck/unify/models/components/Transactions.java +++ b/src/main/java/com/apideck/unify/models/components/Transactions.java @@ -15,6 +15,7 @@ import java.lang.SuppressWarnings; import java.time.OffsetDateTime; import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; public class Transactions { @@ -70,6 +71,15 @@ public class Transactions { @JsonProperty("transaction_type") private Optional transactionType; + /** + * The ISO 18245 merchant category code (MCC) classifying the merchant for this transaction, expected + * as a four-digit code such as `5812`. The format is not enforced by the API, matching the other bank + * identifier fields. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("merchant_category_code") + private JsonNullable merchantCategoryCode; + @JsonCreator public Transactions( @JsonProperty("posted_date") OffsetDateTime postedDate, @@ -79,7 +89,8 @@ public Transactions( @JsonProperty("source_transaction_id") String sourceTransactionId, @JsonProperty("counterparty") Optional counterparty, @JsonProperty("reference") Optional reference, - @JsonProperty("transaction_type") Optional transactionType) { + @JsonProperty("transaction_type") Optional transactionType, + @JsonProperty("merchant_category_code") JsonNullable merchantCategoryCode) { Utils.checkNotNull(postedDate, "postedDate"); Utils.checkNotNull(description, "description"); Utils.checkNotNull(amount, "amount"); @@ -88,6 +99,7 @@ public Transactions( Utils.checkNotNull(counterparty, "counterparty"); Utils.checkNotNull(reference, "reference"); Utils.checkNotNull(transactionType, "transactionType"); + Utils.checkNotNull(merchantCategoryCode, "merchantCategoryCode"); this.postedDate = postedDate; this.description = description; this.amount = amount; @@ -96,6 +108,7 @@ public Transactions( this.counterparty = counterparty; this.reference = reference; this.transactionType = transactionType; + this.merchantCategoryCode = merchantCategoryCode; } public Transactions( @@ -105,7 +118,7 @@ public Transactions( String sourceTransactionId) { this(postedDate, Optional.empty(), amount, creditOrDebit, sourceTransactionId, Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), JsonNullable.undefined()); } /** @@ -173,6 +186,16 @@ public Optional transactionType() { return (Optional) transactionType; } + /** + * The ISO 18245 merchant category code (MCC) classifying the merchant for this transaction, expected + * as a four-digit code such as `5812`. The format is not enforced by the API, matching the other bank + * identifier fields. + */ + @JsonIgnore + public JsonNullable merchantCategoryCode() { + return merchantCategoryCode; + } + public static Builder builder() { return new Builder(); } @@ -290,6 +313,28 @@ public Transactions withTransactionType(Optional merchantCategoryCode) { + Utils.checkNotNull(merchantCategoryCode, "merchantCategoryCode"); + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -307,7 +352,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.sourceTransactionId, other.sourceTransactionId) && Utils.enhancedDeepEquals(this.counterparty, other.counterparty) && Utils.enhancedDeepEquals(this.reference, other.reference) && - Utils.enhancedDeepEquals(this.transactionType, other.transactionType); + Utils.enhancedDeepEquals(this.transactionType, other.transactionType) && + Utils.enhancedDeepEquals(this.merchantCategoryCode, other.merchantCategoryCode); } @Override @@ -315,7 +361,7 @@ public int hashCode() { return Utils.enhancedHash( postedDate, description, amount, creditOrDebit, sourceTransactionId, counterparty, - reference, transactionType); + reference, transactionType, merchantCategoryCode); } @Override @@ -328,7 +374,8 @@ public String toString() { "sourceTransactionId", sourceTransactionId, "counterparty", counterparty, "reference", reference, - "transactionType", transactionType); + "transactionType", transactionType, + "merchantCategoryCode", merchantCategoryCode); } @SuppressWarnings("UnusedReturnValue") @@ -350,6 +397,8 @@ public final static class Builder { private Optional transactionType = Optional.empty(); + private JsonNullable merchantCategoryCode = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -470,12 +519,35 @@ public Builder transactionType(Optional merchantCategoryCode) { + Utils.checkNotNull(merchantCategoryCode, "merchantCategoryCode"); + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + public Transactions build() { return new Transactions( postedDate, description, amount, creditOrDebit, sourceTransactionId, counterparty, - reference, transactionType); + reference, transactionType, merchantCategoryCode); } } diff --git a/src/main/java/com/apideck/unify/models/components/UpdatePaymentMethodResponse.java b/src/main/java/com/apideck/unify/models/components/UpdatePaymentMethodResponse.java new file mode 100644 index 000000000..97b5c037d --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/UpdatePaymentMethodResponse.java @@ -0,0 +1,388 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * UpdatePaymentMethodResponse + * + *

Payment Methods + */ +public class UpdatePaymentMethodResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonProperty("data") + private UnifiedId data; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public UpdatePaymentMethodResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") UnifiedId data, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.raw = raw; + } + + public UpdatePaymentMethodResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + UnifiedId data) { + this(statusCode, status, service, + resource, operation, data, + JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonIgnore + public UnifiedId data() { + return data; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public UpdatePaymentMethodResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public UpdatePaymentMethodResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public UpdatePaymentMethodResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public UpdatePaymentMethodResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public UpdatePaymentMethodResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public UpdatePaymentMethodResponse withData(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public UpdatePaymentMethodResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public UpdatePaymentMethodResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + 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.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + raw); + } + + @Override + public String toString() { + return Utils.toString(UpdatePaymentMethodResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private UnifiedId data; + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public Builder data(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public UpdatePaymentMethodResponse build() { + + return new UpdatePaymentMethodResponse( + statusCode, status, service, + resource, operation, data, + raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/UpdateSalesReceiptResponse.java b/src/main/java/com/apideck/unify/models/components/UpdateSalesReceiptResponse.java new file mode 100644 index 000000000..92f9a2b0f --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/UpdateSalesReceiptResponse.java @@ -0,0 +1,388 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +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 java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * UpdateSalesReceiptResponse + * + *

SalesReceipt updated + */ +public class UpdateSalesReceiptResponse { + /** + * HTTP Response Status Code + */ + @JsonProperty("status_code") + private long statusCode; + + /** + * HTTP Response Status + */ + @JsonProperty("status") + private String status; + + /** + * Apideck ID of service provider + */ + @JsonProperty("service") + private String service; + + /** + * Unified API resource name + */ + @JsonProperty("resource") + private String resource; + + /** + * Operation performed + */ + @JsonProperty("operation") + private String operation; + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonProperty("data") + private UnifiedId data; + + /** + * Raw response from the integration when raw=true query param is provided + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_raw") + private JsonNullable> raw; + + @JsonCreator + public UpdateSalesReceiptResponse( + @JsonProperty("status_code") long statusCode, + @JsonProperty("status") String status, + @JsonProperty("service") String service, + @JsonProperty("resource") String resource, + @JsonProperty("operation") String operation, + @JsonProperty("data") UnifiedId data, + @JsonProperty("_raw") JsonNullable> raw) { + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(service, "service"); + Utils.checkNotNull(resource, "resource"); + Utils.checkNotNull(operation, "operation"); + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(raw, "raw"); + this.statusCode = statusCode; + this.status = status; + this.service = service; + this.resource = resource; + this.operation = operation; + this.data = data; + this.raw = raw; + } + + public UpdateSalesReceiptResponse( + long statusCode, + String status, + String service, + String resource, + String operation, + UnifiedId data) { + this(statusCode, status, service, + resource, operation, data, + JsonNullable.undefined()); + } + + /** + * HTTP Response Status Code + */ + @JsonIgnore + public long statusCode() { + return statusCode; + } + + /** + * HTTP Response Status + */ + @JsonIgnore + public String status() { + return status; + } + + /** + * Apideck ID of service provider + */ + @JsonIgnore + public String service() { + return service; + } + + /** + * Unified API resource name + */ + @JsonIgnore + public String resource() { + return resource; + } + + /** + * Operation performed + */ + @JsonIgnore + public String operation() { + return operation; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + @JsonIgnore + public UnifiedId data() { + return data; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> raw() { + return (JsonNullable>) raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP Response Status Code + */ + public UpdateSalesReceiptResponse withStatusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * HTTP Response Status + */ + public UpdateSalesReceiptResponse withStatus(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Apideck ID of service provider + */ + public UpdateSalesReceiptResponse withService(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + /** + * Unified API resource name + */ + public UpdateSalesReceiptResponse withResource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + /** + * Operation performed + */ + public UpdateSalesReceiptResponse withOperation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public UpdateSalesReceiptResponse withData(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public UpdateSalesReceiptResponse withRaw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public UpdateSalesReceiptResponse withRaw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSalesReceiptResponse other = (UpdateSalesReceiptResponse) o; + return + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.service, other.service) && + Utils.enhancedDeepEquals(this.resource, other.resource) && + Utils.enhancedDeepEquals(this.operation, other.operation) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + statusCode, status, service, + resource, operation, data, + raw); + } + + @Override + public String toString() { + return Utils.toString(UpdateSalesReceiptResponse.class, + "statusCode", statusCode, + "status", status, + "service", service, + "resource", resource, + "operation", operation, + "data", data, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Long statusCode; + + private String status; + + private String service; + + private String resource; + + private String operation; + + private UnifiedId data; + + private JsonNullable> raw = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP Response Status Code + */ + public Builder statusCode(long statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * HTTP Response Status + */ + public Builder status(String status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Apideck ID of service provider + */ + public Builder service(String service) { + Utils.checkNotNull(service, "service"); + this.service = service; + return this; + } + + + /** + * Unified API resource name + */ + public Builder resource(String resource) { + Utils.checkNotNull(resource, "resource"); + this.resource = resource; + return this; + } + + + /** + * Operation performed + */ + public Builder operation(String operation) { + Utils.checkNotNull(operation, "operation"); + this.operation = operation; + return this; + } + + + /** + * A object containing a unique identifier for the resource that was created, updated, or deleted. + */ + public Builder data(UnifiedId data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(Map raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = JsonNullable.of(raw); + return this; + } + + /** + * Raw response from the integration when raw=true query param is provided + */ + public Builder raw(JsonNullable> raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public UpdateSalesReceiptResponse build() { + + return new UpdateSalesReceiptResponse( + statusCode, status, service, + resource, operation, data, + raw); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadRequest.java index 5c0db9f87..2b58b4ebe 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadRequest.java @@ -4,10 +4,13 @@ package com.apideck.unify.models.operations; import com.apideck.unify.models.components.AttachmentReferenceType; +import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.util.Optional; @@ -73,6 +76,17 @@ public class AccountingAttachmentsDownloadRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fields") private JsonNullable fields; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + @JsonCreator public AccountingAttachmentsDownloadRequest( AttachmentReferenceType referenceType, @@ -82,7 +96,8 @@ public AccountingAttachmentsDownloadRequest( Optional appId, Optional serviceId, Optional companyId, - JsonNullable fields) { + JsonNullable fields, + Optional followRedirects) { Utils.checkNotNull(referenceType, "referenceType"); Utils.checkNotNull(referenceId, "referenceId"); Utils.checkNotNull(id, "id"); @@ -91,6 +106,7 @@ public AccountingAttachmentsDownloadRequest( Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(companyId, "companyId"); Utils.checkNotNull(fields, "fields"); + Utils.checkNotNull(followRedirects, "followRedirects"); this.referenceType = referenceType; this.referenceId = referenceId; this.id = id; @@ -99,6 +115,7 @@ public AccountingAttachmentsDownloadRequest( this.serviceId = serviceId; this.companyId = companyId; this.fields = fields; + this.followRedirects = followRedirects; } public AccountingAttachmentsDownloadRequest( @@ -107,7 +124,7 @@ public AccountingAttachmentsDownloadRequest( String id) { this(referenceType, referenceId, id, Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), JsonNullable.undefined()); + Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -184,6 +201,19 @@ public JsonNullable fields() { return fields; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + public static Builder builder() { return new Builder(); } @@ -330,6 +360,35 @@ public AccountingAttachmentsDownloadRequest withFields(JsonNullable fiel return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public AccountingAttachmentsDownloadRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public AccountingAttachmentsDownloadRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -347,7 +406,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.fields, other.fields); + Utils.enhancedDeepEquals(this.fields, other.fields) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects); } @Override @@ -355,7 +415,7 @@ public int hashCode() { return Utils.enhancedHash( referenceType, referenceId, id, consumerId, appId, serviceId, - companyId, fields); + companyId, fields, followRedirects); } @Override @@ -368,7 +428,8 @@ public String toString() { "appId", appId, "serviceId", serviceId, "companyId", companyId, - "fields", fields); + "fields", fields, + "followRedirects", followRedirects); } @SuppressWarnings("UnusedReturnValue") @@ -390,6 +451,8 @@ public final static class Builder { private JsonNullable fields = JsonNullable.undefined(); + private Optional followRedirects; + private Builder() { // force use of static builder() method } @@ -539,13 +602,51 @@ public Builder fields(JsonNullable fields) { return this; } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + public AccountingAttachmentsDownloadRequest build() { + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new AccountingAttachmentsDownloadRequest( referenceType, referenceId, id, consumerId, appId, serviceId, - companyId, fields); + companyId, fields, followRedirects); } + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadResponse.java index fc638b288..c3002fe66 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingAttachmentsDownloadResponse.java @@ -34,7 +34,10 @@ public class AccountingAttachmentsDownloadResponse implements Response { private HttpResponse rawResponse; /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ private Optional getAttachmentDownloadResponse; @@ -95,7 +98,10 @@ public HttpResponse rawResponse() { } /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -145,7 +151,10 @@ public AccountingAttachmentsDownloadResponse withRawResponse(HttpResponse getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); @@ -265,7 +277,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ public Builder getAttachmentDownloadResponse(InputStream getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); @@ -274,7 +289,10 @@ public Builder getAttachmentDownloadResponse(InputStream getAttachmentDownloadRe } /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ public Builder getAttachmentDownloadResponse(Optional getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequest.java new file mode 100644 index 000000000..0c753c191 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequest.java @@ -0,0 +1,354 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.AccountingPaymentMethodInput; +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AccountingPaymentMethodsAddRequest { + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private AccountingPaymentMethodInput accountingPaymentMethod; + + @JsonCreator + public AccountingPaymentMethodsAddRequest( + Optional raw, + Optional consumerId, + Optional appId, + Optional serviceId, + AccountingPaymentMethodInput accountingPaymentMethod) { + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(accountingPaymentMethod, "accountingPaymentMethod"); + this.raw = raw; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.accountingPaymentMethod = accountingPaymentMethod; + } + + public AccountingPaymentMethodsAddRequest( + AccountingPaymentMethodInput accountingPaymentMethod) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), accountingPaymentMethod); + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + @JsonIgnore + public AccountingPaymentMethodInput accountingPaymentMethod() { + return accountingPaymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsAddRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsAddRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsAddRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsAddRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsAddRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsAddRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsAddRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsAddRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + public AccountingPaymentMethodsAddRequest withAccountingPaymentMethod(AccountingPaymentMethodInput accountingPaymentMethod) { + Utils.checkNotNull(accountingPaymentMethod, "accountingPaymentMethod"); + this.accountingPaymentMethod = accountingPaymentMethod; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsAddRequest other = (AccountingPaymentMethodsAddRequest) o; + return + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.accountingPaymentMethod, other.accountingPaymentMethod); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + raw, consumerId, appId, + serviceId, accountingPaymentMethod); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsAddRequest.class, + "raw", raw, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "accountingPaymentMethod", accountingPaymentMethod); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional raw; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private AccountingPaymentMethodInput accountingPaymentMethod; + + private Builder() { + // force use of static builder() method + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + public Builder accountingPaymentMethod(AccountingPaymentMethodInput accountingPaymentMethod) { + Utils.checkNotNull(accountingPaymentMethod, "accountingPaymentMethod"); + this.accountingPaymentMethod = accountingPaymentMethod; + return this; + } + + public AccountingPaymentMethodsAddRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingPaymentMethodsAddRequest( + raw, consumerId, appId, + serviceId, accountingPaymentMethod); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequestBuilder.java new file mode 100644 index 000000000..4d1f80195 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingPaymentMethodsAdd; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingPaymentMethodsAddRequestBuilder { + + private AccountingPaymentMethodsAddRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsAddRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsAddRequestBuilder request(AccountingPaymentMethodsAddRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsAddRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsAddRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingPaymentMethodsAddResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingPaymentMethodsAdd.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddResponse.java new file mode 100644 index 000000000..e9fe75a9c --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAddResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.CreatePaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsAddResponse 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; + + /** + * Payment Methods + */ + private Optional createPaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional createPaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.createPaymentMethodResponse = createPaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional createPaymentMethodResponse() { + return (Optional) createPaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsAddResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsAddResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsAddResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAddResponse withCreatePaymentMethodResponse(CreatePaymentMethodResponse createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = Optional.ofNullable(createPaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAddResponse withCreatePaymentMethodResponse(Optional createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = createPaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAddResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAddResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsAddResponse other = (AccountingPaymentMethodsAddResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.createPaymentMethodResponse, other.createPaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + createPaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsAddResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "createPaymentMethodResponse", createPaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional createPaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder createPaymentMethodResponse(CreatePaymentMethodResponse createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = Optional.ofNullable(createPaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder createPaymentMethodResponse(Optional createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = createPaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsAddResponse build() { + + return new AccountingPaymentMethodsAddResponse( + contentType, statusCode, rawResponse, + createPaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequest.java new file mode 100644 index 000000000..851d04ff6 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequest.java @@ -0,0 +1,635 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AccountingPaymentMethodsAllRequest { + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=cursor") + private JsonNullable cursor; + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fields") + private JsonNullable fields; + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=pass_through") + private Optional> passThrough; + + @JsonCreator + public AccountingPaymentMethodsAllRequest( + Optional raw, + Optional consumerId, + Optional appId, + Optional serviceId, + JsonNullable cursor, + Optional limit, + JsonNullable fields, + Optional> passThrough) { + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(cursor, "cursor"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(fields, "fields"); + Utils.checkNotNull(passThrough, "passThrough"); + this.raw = raw; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.cursor = cursor; + this.limit = limit; + this.fields = fields; + this.passThrough = passThrough; + } + + public AccountingPaymentMethodsAllRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + @JsonIgnore + public JsonNullable cursor() { + return cursor; + } + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @JsonIgnore + public JsonNullable fields() { + return fields; + } + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsAllRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsAllRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsAllRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsAllRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsAllRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsAllRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsAllRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsAllRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public AccountingPaymentMethodsAllRequest withCursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public AccountingPaymentMethodsAllRequest withCursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public AccountingPaymentMethodsAllRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public AccountingPaymentMethodsAllRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingPaymentMethodsAllRequest withFields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingPaymentMethodsAllRequest withFields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public AccountingPaymentMethodsAllRequest withPassThrough(Map passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public AccountingPaymentMethodsAllRequest withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsAllRequest other = (AccountingPaymentMethodsAllRequest) o; + return + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.cursor, other.cursor) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.fields, other.fields) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + raw, consumerId, appId, + serviceId, cursor, limit, + fields, passThrough); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsAllRequest.class, + "raw", raw, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "cursor", cursor, + "limit", limit, + "fields", fields, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional raw; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private JsonNullable cursor = JsonNullable.undefined(); + + private Optional limit; + + private JsonNullable fields = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public Builder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public Builder cursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public Builder passThrough(Map passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public AccountingPaymentMethodsAllRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + return new AccountingPaymentMethodsAllRequest( + raw, consumerId, appId, + serviceId, cursor, limit, + fields, passThrough); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "20", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequestBuilder.java new file mode 100644 index 000000000..fc41c66ac --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllRequestBuilder.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.utils.Utils.transform; +import static com.apideck.unify.utils.Utils.toStream; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingPaymentMethodsAll; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.apideck.unify.utils.pagination.CursorTracker; +import com.apideck.unify.utils.pagination.Paginator; +import java.io.InputStream; +import java.lang.Iterable; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Iterator; +import java.util.Optional; +import java.util.stream.Stream; + +public class AccountingPaymentMethodsAllRequestBuilder { + + private AccountingPaymentMethodsAllRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsAllRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsAllRequestBuilder request(AccountingPaymentMethodsAllRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsAllRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsAllRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingPaymentMethodsAllResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingPaymentMethodsAll.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Returns an iterable that performs next page calls till no more pages + * are returned. + * + *

The returned iterable can be used in a for-each loop: + *


+    * for (AccountingPaymentMethodsAllResponse page : builder.callAsIterable()) {
+    *     // Process each page
+    * }
+    * 
+ * + * @return An iterable that can be used to iterate through all pages + */ + public Iterable callAsIterable() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingPaymentMethodsAll.Sync(sdkConfiguration, options, _headers); + Iterator> iterator = new Paginator<>( + request, + new CursorTracker<>("$.meta.cursors.next", String.class), + (req, pos) -> { + var modifiedReq = pos == null ? req : req.withCursor(pos); + return unchecked(() -> operation.doRequest(modifiedReq)).get(); + }); + + return () -> transform(iterator, operation::handleResponse); + } + + /** + * Returns a stream that performs next page calls till no more pages + * are returned. + **/ + public Stream callAsStream() { + return toStream(callAsIterable()); + } + +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllResponse.java new file mode 100644 index 000000000..87e6a7bf0 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsAllResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.GetPaymentMethodsResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsAllResponse 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; + + /** + * Payment Methods + */ + private Optional getPaymentMethodsResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getPaymentMethodsResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getPaymentMethodsResponse = getPaymentMethodsResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getPaymentMethodsResponse() { + return (Optional) getPaymentMethodsResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsAllResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsAllResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsAllResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAllResponse withGetPaymentMethodsResponse(GetPaymentMethodsResponse getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = Optional.ofNullable(getPaymentMethodsResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAllResponse withGetPaymentMethodsResponse(Optional getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = getPaymentMethodsResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAllResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAllResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsAllResponse other = (AccountingPaymentMethodsAllResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getPaymentMethodsResponse, other.getPaymentMethodsResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getPaymentMethodsResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsAllResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getPaymentMethodsResponse", getPaymentMethodsResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getPaymentMethodsResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder getPaymentMethodsResponse(GetPaymentMethodsResponse getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = Optional.ofNullable(getPaymentMethodsResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder getPaymentMethodsResponse(Optional getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = getPaymentMethodsResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsAllResponse build() { + + return new AccountingPaymentMethodsAllResponse( + contentType, statusCode, rawResponse, + getPaymentMethodsResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequest.java new file mode 100644 index 000000000..1b75b2d93 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequest.java @@ -0,0 +1,364 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AccountingPaymentMethodsDeleteRequest { + /** + * ID of the record you are acting upon. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") + private String id; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + @JsonCreator + public AccountingPaymentMethodsDeleteRequest( + String id, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional raw) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(raw, "raw"); + this.id = id; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.raw = raw; + } + + public AccountingPaymentMethodsDeleteRequest( + String id) { + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); + } + + /** + * ID of the record you are acting upon. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ID of the record you are acting upon. + */ + public AccountingPaymentMethodsDeleteRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsDeleteRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsDeleteRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsDeleteRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsDeleteRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsDeleteRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsDeleteRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsDeleteRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsDeleteRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsDeleteRequest other = (AccountingPaymentMethodsDeleteRequest) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.raw, other.raw); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, consumerId, appId, + serviceId, raw); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsDeleteRequest.class, + "id", id, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "raw", raw); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional raw; + + private Builder() { + // force use of static builder() method + } + + + /** + * ID of the record you are acting upon. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public AccountingPaymentMethodsDeleteRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingPaymentMethodsDeleteRequest( + id, consumerId, appId, + serviceId, raw); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequestBuilder.java new file mode 100644 index 000000000..53d337ebc --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingPaymentMethodsDelete; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingPaymentMethodsDeleteRequestBuilder { + + private AccountingPaymentMethodsDeleteRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsDeleteRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsDeleteRequestBuilder request(AccountingPaymentMethodsDeleteRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsDeleteRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsDeleteRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingPaymentMethodsDeleteResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingPaymentMethodsDelete.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteResponse.java new file mode 100644 index 000000000..9281ef874 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsDeleteResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.DeletePaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsDeleteResponse 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; + + /** + * Payment Methods + */ + private Optional deletePaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional deletePaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.deletePaymentMethodResponse = deletePaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional deletePaymentMethodResponse() { + return (Optional) deletePaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsDeleteResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsDeleteResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsDeleteResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsDeleteResponse withDeletePaymentMethodResponse(DeletePaymentMethodResponse deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = Optional.ofNullable(deletePaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsDeleteResponse withDeletePaymentMethodResponse(Optional deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = deletePaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsDeleteResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsDeleteResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsDeleteResponse other = (AccountingPaymentMethodsDeleteResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.deletePaymentMethodResponse, other.deletePaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + deletePaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsDeleteResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "deletePaymentMethodResponse", deletePaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional deletePaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder deletePaymentMethodResponse(DeletePaymentMethodResponse deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = Optional.ofNullable(deletePaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder deletePaymentMethodResponse(Optional deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = deletePaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsDeleteResponse build() { + + return new AccountingPaymentMethodsDeleteResponse( + contentType, statusCode, rawResponse, + deletePaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequest.java new file mode 100644 index 000000000..b60959a68 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequest.java @@ -0,0 +1,471 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AccountingPaymentMethodsOneRequest { + /** + * ID of the record you are acting upon. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") + private String id; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fields") + private JsonNullable fields; + + @JsonCreator + public AccountingPaymentMethodsOneRequest( + String id, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional raw, + JsonNullable fields) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(fields, "fields"); + this.id = id; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.raw = raw; + this.fields = fields; + } + + public AccountingPaymentMethodsOneRequest( + String id) { + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), JsonNullable.undefined()); + } + + /** + * ID of the record you are acting upon. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @JsonIgnore + public JsonNullable fields() { + return fields; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ID of the record you are acting upon. + */ + public AccountingPaymentMethodsOneRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsOneRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsOneRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsOneRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsOneRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsOneRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsOneRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsOneRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsOneRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingPaymentMethodsOneRequest withFields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingPaymentMethodsOneRequest withFields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsOneRequest other = (AccountingPaymentMethodsOneRequest) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.fields, other.fields); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, consumerId, appId, + serviceId, raw, fields); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsOneRequest.class, + "id", id, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "raw", raw, + "fields", fields); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional raw; + + private JsonNullable fields = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * ID of the record you are acting upon. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + public AccountingPaymentMethodsOneRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingPaymentMethodsOneRequest( + id, consumerId, appId, + serviceId, raw, fields); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequestBuilder.java new file mode 100644 index 000000000..e97e86989 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingPaymentMethodsOne; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingPaymentMethodsOneRequestBuilder { + + private AccountingPaymentMethodsOneRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsOneRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsOneRequestBuilder request(AccountingPaymentMethodsOneRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsOneRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsOneRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingPaymentMethodsOneResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingPaymentMethodsOne.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneResponse.java new file mode 100644 index 000000000..cf405afd2 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsOneResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.GetPaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsOneResponse 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; + + /** + * Payment Methods + */ + private Optional getPaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getPaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getPaymentMethodResponse = getPaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getPaymentMethodResponse() { + return (Optional) getPaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsOneResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsOneResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsOneResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsOneResponse withGetPaymentMethodResponse(GetPaymentMethodResponse getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = Optional.ofNullable(getPaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsOneResponse withGetPaymentMethodResponse(Optional getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = getPaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsOneResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsOneResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsOneResponse other = (AccountingPaymentMethodsOneResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getPaymentMethodResponse, other.getPaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getPaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsOneResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getPaymentMethodResponse", getPaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getPaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder getPaymentMethodResponse(GetPaymentMethodResponse getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = Optional.ofNullable(getPaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder getPaymentMethodResponse(Optional getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = getPaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsOneResponse build() { + + return new AccountingPaymentMethodsOneResponse( + contentType, statusCode, rawResponse, + getPaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequest.java new file mode 100644 index 000000000..c2e295f5d --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequest.java @@ -0,0 +1,395 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.AccountingPaymentMethodInput; +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AccountingPaymentMethodsUpdateRequest { + /** + * ID of the record you are acting upon. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") + private String id; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private AccountingPaymentMethodInput accountingPaymentMethod; + + @JsonCreator + public AccountingPaymentMethodsUpdateRequest( + String id, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional raw, + AccountingPaymentMethodInput accountingPaymentMethod) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(accountingPaymentMethod, "accountingPaymentMethod"); + this.id = id; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.raw = raw; + this.accountingPaymentMethod = accountingPaymentMethod; + } + + public AccountingPaymentMethodsUpdateRequest( + String id, + AccountingPaymentMethodInput accountingPaymentMethod) { + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), accountingPaymentMethod); + } + + /** + * ID of the record you are acting upon. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + @JsonIgnore + public AccountingPaymentMethodInput accountingPaymentMethod() { + return accountingPaymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ID of the record you are acting upon. + */ + public AccountingPaymentMethodsUpdateRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsUpdateRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingPaymentMethodsUpdateRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsUpdateRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingPaymentMethodsUpdateRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsUpdateRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingPaymentMethodsUpdateRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsUpdateRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingPaymentMethodsUpdateRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + public AccountingPaymentMethodsUpdateRequest withAccountingPaymentMethod(AccountingPaymentMethodInput accountingPaymentMethod) { + Utils.checkNotNull(accountingPaymentMethod, "accountingPaymentMethod"); + this.accountingPaymentMethod = accountingPaymentMethod; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsUpdateRequest other = (AccountingPaymentMethodsUpdateRequest) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.accountingPaymentMethod, other.accountingPaymentMethod); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, consumerId, appId, + serviceId, raw, accountingPaymentMethod); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsUpdateRequest.class, + "id", id, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "raw", raw, + "accountingPaymentMethod", accountingPaymentMethod); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional raw; + + private AccountingPaymentMethodInput accountingPaymentMethod; + + private Builder() { + // force use of static builder() method + } + + + /** + * ID of the record you are acting upon. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + public Builder accountingPaymentMethod(AccountingPaymentMethodInput accountingPaymentMethod) { + Utils.checkNotNull(accountingPaymentMethod, "accountingPaymentMethod"); + this.accountingPaymentMethod = accountingPaymentMethod; + return this; + } + + public AccountingPaymentMethodsUpdateRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingPaymentMethodsUpdateRequest( + id, consumerId, appId, + serviceId, raw, accountingPaymentMethod); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequestBuilder.java new file mode 100644 index 000000000..ea0126cf7 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingPaymentMethodsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingPaymentMethodsUpdateRequestBuilder { + + private AccountingPaymentMethodsUpdateRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsUpdateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsUpdateRequestBuilder request(AccountingPaymentMethodsUpdateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsUpdateRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsUpdateRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingPaymentMethodsUpdateResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingPaymentMethodsUpdate.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateResponse.java new file mode 100644 index 000000000..ca830654a --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentMethodsUpdateResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.components.UpdatePaymentMethodResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsUpdateResponse 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; + + /** + * Payment Methods + */ + private Optional updatePaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional updatePaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.updatePaymentMethodResponse = updatePaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional updatePaymentMethodResponse() { + return (Optional) updatePaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsUpdateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsUpdateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsUpdateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsUpdateResponse withUpdatePaymentMethodResponse(UpdatePaymentMethodResponse updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = Optional.ofNullable(updatePaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsUpdateResponse withUpdatePaymentMethodResponse(Optional updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = updatePaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsUpdateResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsUpdateResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsUpdateResponse other = (AccountingPaymentMethodsUpdateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.updatePaymentMethodResponse, other.updatePaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + updatePaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsUpdateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "updatePaymentMethodResponse", updatePaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional updatePaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder updatePaymentMethodResponse(UpdatePaymentMethodResponse updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = Optional.ofNullable(updatePaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder updatePaymentMethodResponse(Optional updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = updatePaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsUpdateResponse build() { + + return new AccountingPaymentMethodsUpdateResponse( + contentType, statusCode, rawResponse, + updatePaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequest.java new file mode 100644 index 000000000..38398a79b --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequest.java @@ -0,0 +1,419 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.SalesReceiptInput; +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AccountingSalesReceiptsAddRequest { + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-company-id") + private Optional companyId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private SalesReceiptInput salesReceipt; + + @JsonCreator + public AccountingSalesReceiptsAddRequest( + Optional raw, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional companyId, + SalesReceiptInput salesReceipt) { + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(salesReceipt, "salesReceipt"); + this.raw = raw; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.companyId = companyId; + this.salesReceipt = salesReceipt; + } + + public AccountingSalesReceiptsAddRequest( + SalesReceiptInput salesReceipt) { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), salesReceipt); + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @JsonIgnore + public Optional companyId() { + return companyId; + } + + @JsonIgnore + public SalesReceiptInput salesReceipt() { + return salesReceipt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsAddRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsAddRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsAddRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsAddRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsAddRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsAddRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsAddRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsAddRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsAddRequest withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsAddRequest withCompanyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public AccountingSalesReceiptsAddRequest withSalesReceipt(SalesReceiptInput salesReceipt) { + Utils.checkNotNull(salesReceipt, "salesReceipt"); + this.salesReceipt = salesReceipt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsAddRequest other = (AccountingSalesReceiptsAddRequest) o; + return + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.salesReceipt, other.salesReceipt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + raw, consumerId, appId, + serviceId, companyId, salesReceipt); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsAddRequest.class, + "raw", raw, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "companyId", companyId, + "salesReceipt", salesReceipt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional raw; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional companyId = Optional.empty(); + + private SalesReceiptInput salesReceipt; + + private Builder() { + // force use of static builder() method + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + public Builder salesReceipt(SalesReceiptInput salesReceipt) { + Utils.checkNotNull(salesReceipt, "salesReceipt"); + this.salesReceipt = salesReceipt; + return this; + } + + public AccountingSalesReceiptsAddRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingSalesReceiptsAddRequest( + raw, consumerId, appId, + serviceId, companyId, salesReceipt); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequestBuilder.java new file mode 100644 index 000000000..51ca36f8b --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingSalesReceiptsAdd; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingSalesReceiptsAddRequestBuilder { + + private AccountingSalesReceiptsAddRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsAddRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsAddRequestBuilder request(AccountingSalesReceiptsAddRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsAddRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsAddRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingSalesReceiptsAddResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingSalesReceiptsAdd.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddResponse.java new file mode 100644 index 000000000..ae3629f68 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAddResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.CreateSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsAddResponse 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; + + /** + * SalesReceipt created + */ + private Optional createSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional createSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.createSalesReceiptResponse = createSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt created + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional createSalesReceiptResponse() { + return (Optional) createSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsAddResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsAddResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsAddResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt created + */ + public AccountingSalesReceiptsAddResponse withCreateSalesReceiptResponse(CreateSalesReceiptResponse createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = Optional.ofNullable(createSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt created + */ + public AccountingSalesReceiptsAddResponse withCreateSalesReceiptResponse(Optional createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = createSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAddResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAddResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsAddResponse other = (AccountingSalesReceiptsAddResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.createSalesReceiptResponse, other.createSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + createSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsAddResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "createSalesReceiptResponse", createSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional createSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt created + */ + public Builder createSalesReceiptResponse(CreateSalesReceiptResponse createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = Optional.ofNullable(createSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt created + */ + public Builder createSalesReceiptResponse(Optional createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = createSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsAddResponse build() { + + return new AccountingSalesReceiptsAddResponse( + contentType, statusCode, rawResponse, + createSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequest.java new file mode 100644 index 000000000..5cfa9cfa5 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequest.java @@ -0,0 +1,825 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.SalesReceiptsFilter; +import com.apideck.unify.models.components.SalesReceiptsSort; +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AccountingSalesReceiptsAllRequest { + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-company-id") + private Optional companyId; + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=cursor") + private JsonNullable cursor; + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + /** + * Apply filters + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=filter") + private Optional filter; + + /** + * Apply sorting + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=sort") + private Optional sort; + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=pass_through") + private Optional> passThrough; + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fields") + private JsonNullable fields; + + @JsonCreator + public AccountingSalesReceiptsAllRequest( + Optional raw, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional companyId, + JsonNullable cursor, + Optional limit, + Optional filter, + Optional sort, + Optional> passThrough, + JsonNullable fields) { + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(cursor, "cursor"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(filter, "filter"); + Utils.checkNotNull(sort, "sort"); + Utils.checkNotNull(passThrough, "passThrough"); + Utils.checkNotNull(fields, "fields"); + this.raw = raw; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.companyId = companyId; + this.cursor = cursor; + this.limit = limit; + this.filter = filter; + this.sort = sort; + this.passThrough = passThrough; + this.fields = fields; + } + + public AccountingSalesReceiptsAllRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), JsonNullable.undefined()); + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @JsonIgnore + public Optional companyId() { + return companyId; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + @JsonIgnore + public JsonNullable cursor() { + return cursor; + } + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + /** + * Apply filters + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional filter() { + return (Optional) filter; + } + + /** + * Apply sorting + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional sort() { + return (Optional) sort; + } + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @JsonIgnore + public JsonNullable fields() { + return fields; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsAllRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsAllRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsAllRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsAllRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsAllRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsAllRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsAllRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsAllRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsAllRequest withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsAllRequest withCompanyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public AccountingSalesReceiptsAllRequest withCursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public AccountingSalesReceiptsAllRequest withCursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public AccountingSalesReceiptsAllRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public AccountingSalesReceiptsAllRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * Apply filters + */ + public AccountingSalesReceiptsAllRequest withFilter(SalesReceiptsFilter filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + + /** + * Apply filters + */ + public AccountingSalesReceiptsAllRequest withFilter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + /** + * Apply sorting + */ + public AccountingSalesReceiptsAllRequest withSort(SalesReceiptsSort sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + + /** + * Apply sorting + */ + public AccountingSalesReceiptsAllRequest withSort(Optional sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public AccountingSalesReceiptsAllRequest withPassThrough(Map passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public AccountingSalesReceiptsAllRequest withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingSalesReceiptsAllRequest withFields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingSalesReceiptsAllRequest withFields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsAllRequest other = (AccountingSalesReceiptsAllRequest) o; + return + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.cursor, other.cursor) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.filter, other.filter) && + Utils.enhancedDeepEquals(this.sort, other.sort) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough) && + Utils.enhancedDeepEquals(this.fields, other.fields); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + raw, consumerId, appId, + serviceId, companyId, cursor, + limit, filter, sort, + passThrough, fields); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsAllRequest.class, + "raw", raw, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "companyId", companyId, + "cursor", cursor, + "limit", limit, + "filter", filter, + "sort", sort, + "passThrough", passThrough, + "fields", fields); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional raw; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional companyId = Optional.empty(); + + private JsonNullable cursor = JsonNullable.undefined(); + + private Optional limit; + + private Optional filter = Optional.empty(); + + private Optional sort = Optional.empty(); + + private Optional> passThrough = Optional.empty(); + + private JsonNullable fields = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public Builder cursor(String cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of + * the response. + */ + public Builder cursor(JsonNullable cursor) { + Utils.checkNotNull(cursor, "cursor"); + this.cursor = cursor; + return this; + } + + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + + /** + * Apply filters + */ + public Builder filter(SalesReceiptsFilter filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = Optional.ofNullable(filter); + return this; + } + + /** + * Apply filters + */ + public Builder filter(Optional filter) { + Utils.checkNotNull(filter, "filter"); + this.filter = filter; + return this; + } + + + /** + * Apply sorting + */ + public Builder sort(SalesReceiptsSort sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = Optional.ofNullable(sort); + return this; + } + + /** + * Apply sorting + */ + public Builder sort(Optional sort) { + Utils.checkNotNull(sort, "sort"); + this.sort = sort; + return this; + } + + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public Builder passThrough(Map passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: + * ?pass_through[search]=leads becomes ?search=leads + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + public AccountingSalesReceiptsAllRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + + return new AccountingSalesReceiptsAllRequest( + raw, consumerId, appId, + serviceId, companyId, cursor, + limit, filter, sort, + passThrough, fields); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "20", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequestBuilder.java new file mode 100644 index 000000000..764b91a7d --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllRequestBuilder.java @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.utils.Utils.transform; +import static com.apideck.unify.utils.Utils.toStream; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingSalesReceiptsAll; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.apideck.unify.utils.pagination.CursorTracker; +import com.apideck.unify.utils.pagination.Paginator; +import java.io.InputStream; +import java.lang.Iterable; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Iterator; +import java.util.Optional; +import java.util.stream.Stream; + +public class AccountingSalesReceiptsAllRequestBuilder { + + private AccountingSalesReceiptsAllRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsAllRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsAllRequestBuilder request(AccountingSalesReceiptsAllRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsAllRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsAllRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingSalesReceiptsAllResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingSalesReceiptsAll.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Returns an iterable that performs next page calls till no more pages + * are returned. + * + *

The returned iterable can be used in a for-each loop: + *


+    * for (AccountingSalesReceiptsAllResponse page : builder.callAsIterable()) {
+    *     // Process each page
+    * }
+    * 
+ * + * @return An iterable that can be used to iterate through all pages + */ + public Iterable callAsIterable() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingSalesReceiptsAll.Sync(sdkConfiguration, options, _headers); + Iterator> iterator = new Paginator<>( + request, + new CursorTracker<>("$.meta.cursors.next", String.class), + (req, pos) -> { + var modifiedReq = pos == null ? req : req.withCursor(pos); + return unchecked(() -> operation.doRequest(modifiedReq)).get(); + }); + + return () -> transform(iterator, operation::handleResponse); + } + + /** + * Returns a stream that performs next page calls till no more pages + * are returned. + **/ + public Stream callAsStream() { + return toStream(callAsIterable()); + } + +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllResponse.java new file mode 100644 index 000000000..0d43e5eb7 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsAllResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.GetSalesReceiptsResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsAllResponse 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; + + /** + * SalesReceipts + */ + private Optional getSalesReceiptsResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getSalesReceiptsResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getSalesReceiptsResponse = getSalesReceiptsResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipts + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getSalesReceiptsResponse() { + return (Optional) getSalesReceiptsResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsAllResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsAllResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsAllResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipts + */ + public AccountingSalesReceiptsAllResponse withGetSalesReceiptsResponse(GetSalesReceiptsResponse getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = Optional.ofNullable(getSalesReceiptsResponse); + return this; + } + + + /** + * SalesReceipts + */ + public AccountingSalesReceiptsAllResponse withGetSalesReceiptsResponse(Optional getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = getSalesReceiptsResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAllResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAllResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsAllResponse other = (AccountingSalesReceiptsAllResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSalesReceiptsResponse, other.getSalesReceiptsResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSalesReceiptsResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsAllResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSalesReceiptsResponse", getSalesReceiptsResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getSalesReceiptsResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipts + */ + public Builder getSalesReceiptsResponse(GetSalesReceiptsResponse getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = Optional.ofNullable(getSalesReceiptsResponse); + return this; + } + + /** + * SalesReceipts + */ + public Builder getSalesReceiptsResponse(Optional getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = getSalesReceiptsResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsAllResponse build() { + + return new AccountingSalesReceiptsAllResponse( + contentType, statusCode, rawResponse, + getSalesReceiptsResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequest.java new file mode 100644 index 000000000..1b5388d32 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequest.java @@ -0,0 +1,429 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AccountingSalesReceiptsDeleteRequest { + /** + * ID of the record you are acting upon. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") + private String id; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-company-id") + private Optional companyId; + + @JsonCreator + public AccountingSalesReceiptsDeleteRequest( + String id, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional raw, + Optional companyId) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(companyId, "companyId"); + this.id = id; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.raw = raw; + this.companyId = companyId; + } + + public AccountingSalesReceiptsDeleteRequest( + String id) { + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * ID of the record you are acting upon. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @JsonIgnore + public Optional companyId() { + return companyId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ID of the record you are acting upon. + */ + public AccountingSalesReceiptsDeleteRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsDeleteRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsDeleteRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsDeleteRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsDeleteRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsDeleteRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsDeleteRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsDeleteRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsDeleteRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsDeleteRequest withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsDeleteRequest withCompanyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsDeleteRequest other = (AccountingSalesReceiptsDeleteRequest) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.companyId, other.companyId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, consumerId, appId, + serviceId, raw, companyId); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsDeleteRequest.class, + "id", id, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "raw", raw, + "companyId", companyId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional raw; + + private Optional companyId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * ID of the record you are acting upon. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public AccountingSalesReceiptsDeleteRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingSalesReceiptsDeleteRequest( + id, consumerId, appId, + serviceId, raw, companyId); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequestBuilder.java new file mode 100644 index 000000000..cbccd4f32 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingSalesReceiptsDelete; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingSalesReceiptsDeleteRequestBuilder { + + private AccountingSalesReceiptsDeleteRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsDeleteRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsDeleteRequestBuilder request(AccountingSalesReceiptsDeleteRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsDeleteRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsDeleteRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingSalesReceiptsDeleteResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingSalesReceiptsDelete.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteResponse.java new file mode 100644 index 000000000..8fc3d9751 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsDeleteResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.DeleteSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsDeleteResponse 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; + + /** + * SalesReceipt deleted + */ + private Optional deleteSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional deleteSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.deleteSalesReceiptResponse = deleteSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt deleted + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional deleteSalesReceiptResponse() { + return (Optional) deleteSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsDeleteResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsDeleteResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsDeleteResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt deleted + */ + public AccountingSalesReceiptsDeleteResponse withDeleteSalesReceiptResponse(DeleteSalesReceiptResponse deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = Optional.ofNullable(deleteSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt deleted + */ + public AccountingSalesReceiptsDeleteResponse withDeleteSalesReceiptResponse(Optional deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = deleteSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsDeleteResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsDeleteResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsDeleteResponse other = (AccountingSalesReceiptsDeleteResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.deleteSalesReceiptResponse, other.deleteSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + deleteSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsDeleteResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "deleteSalesReceiptResponse", deleteSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional deleteSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt deleted + */ + public Builder deleteSalesReceiptResponse(DeleteSalesReceiptResponse deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = Optional.ofNullable(deleteSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt deleted + */ + public Builder deleteSalesReceiptResponse(Optional deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = deleteSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsDeleteResponse build() { + + return new AccountingSalesReceiptsDeleteResponse( + contentType, statusCode, rawResponse, + deleteSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequest.java new file mode 100644 index 000000000..3bc95d6cd --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequest.java @@ -0,0 +1,539 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class AccountingSalesReceiptsOneRequest { + /** + * ID of the record you are acting upon. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") + private String id; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-company-id") + private Optional companyId; + + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fields") + private JsonNullable fields; + + @JsonCreator + public AccountingSalesReceiptsOneRequest( + String id, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional companyId, + Optional raw, + JsonNullable fields) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(fields, "fields"); + this.id = id; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.companyId = companyId; + this.raw = raw; + this.fields = fields; + } + + public AccountingSalesReceiptsOneRequest( + String id) { + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + JsonNullable.undefined()); + } + + /** + * ID of the record you are acting upon. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @JsonIgnore + public Optional companyId() { + return companyId; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + @JsonIgnore + public JsonNullable fields() { + return fields; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ID of the record you are acting upon. + */ + public AccountingSalesReceiptsOneRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsOneRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsOneRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsOneRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsOneRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsOneRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsOneRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsOneRequest withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsOneRequest withCompanyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsOneRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsOneRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingSalesReceiptsOneRequest withFields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public AccountingSalesReceiptsOneRequest withFields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsOneRequest other = (AccountingSalesReceiptsOneRequest) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.fields, other.fields); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, consumerId, appId, + serviceId, companyId, raw, + fields); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsOneRequest.class, + "id", id, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "companyId", companyId, + "raw", raw, + "fields", fields); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional companyId = Optional.empty(); + + private Optional raw; + + private JsonNullable fields = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * ID of the record you are acting upon. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(String fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = JsonNullable.of(fields); + return this; + } + + /** + * The 'fields' parameter allows API users to specify the fields they want to include in the API + * response. If this parameter is not present, the API will return all available fields. If this + * parameter is present, only the fields specified in the comma-separated string will be included in + * the response. + * + *

Nested properties can also be requested by using a dot notation.

Example: + * `fields=name,email,addresses.city`

In the example above, the response will only include + * the fields "name", "email" and "addresses.city". If any other fields are available, they will be + * excluded. + */ + public Builder fields(JsonNullable fields) { + Utils.checkNotNull(fields, "fields"); + this.fields = fields; + return this; + } + + public AccountingSalesReceiptsOneRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingSalesReceiptsOneRequest( + id, consumerId, appId, + serviceId, companyId, raw, + fields); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequestBuilder.java new file mode 100644 index 000000000..48bb9ebe3 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingSalesReceiptsOne; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingSalesReceiptsOneRequestBuilder { + + private AccountingSalesReceiptsOneRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsOneRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsOneRequestBuilder request(AccountingSalesReceiptsOneRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsOneRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsOneRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingSalesReceiptsOneResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingSalesReceiptsOne.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneResponse.java new file mode 100644 index 000000000..573a5da98 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsOneResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.GetSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsOneResponse 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; + + /** + * SalesReceipt + */ + private Optional getSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getSalesReceiptResponse = getSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getSalesReceiptResponse() { + return (Optional) getSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsOneResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsOneResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsOneResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt + */ + public AccountingSalesReceiptsOneResponse withGetSalesReceiptResponse(GetSalesReceiptResponse getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = Optional.ofNullable(getSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt + */ + public AccountingSalesReceiptsOneResponse withGetSalesReceiptResponse(Optional getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = getSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsOneResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsOneResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsOneResponse other = (AccountingSalesReceiptsOneResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSalesReceiptResponse, other.getSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsOneResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSalesReceiptResponse", getSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt + */ + public Builder getSalesReceiptResponse(GetSalesReceiptResponse getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = Optional.ofNullable(getSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt + */ + public Builder getSalesReceiptResponse(Optional getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = getSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsOneResponse build() { + + return new AccountingSalesReceiptsOneResponse( + contentType, statusCode, rawResponse, + getSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java new file mode 100644 index 000000000..3c3101112 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java @@ -0,0 +1,463 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.SalesReceiptInput; +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.SpeakeasyMetadata; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class AccountingSalesReceiptsUpdateRequest { + /** + * ID of the record you are acting upon. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") + private String id; + + /** + * ID of the consumer which you want to get or push data from + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-consumer-id") + private Optional consumerId; + + /** + * The ID of your Unify application + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-app-id") + private Optional appId; + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-service-id") + private Optional serviceId; + + /** + * Include raw response. Mostly used for debugging purposes + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=raw") + private Optional raw; + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-company-id") + private Optional companyId; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private SalesReceiptInput salesReceipt; + + @JsonCreator + public AccountingSalesReceiptsUpdateRequest( + String id, + Optional consumerId, + Optional appId, + Optional serviceId, + Optional raw, + Optional companyId, + SalesReceiptInput salesReceipt) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(consumerId, "consumerId"); + Utils.checkNotNull(appId, "appId"); + Utils.checkNotNull(serviceId, "serviceId"); + Utils.checkNotNull(raw, "raw"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(salesReceipt, "salesReceipt"); + this.id = id; + this.consumerId = consumerId; + this.appId = appId; + this.serviceId = serviceId; + this.raw = raw; + this.companyId = companyId; + this.salesReceipt = salesReceipt; + } + + public AccountingSalesReceiptsUpdateRequest( + String id, + SalesReceiptInput salesReceipt) { + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + salesReceipt); + } + + /** + * ID of the record you are acting upon. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * ID of the consumer which you want to get or push data from + */ + @JsonIgnore + public Optional consumerId() { + return consumerId; + } + + /** + * The ID of your Unify application + */ + @JsonIgnore + public Optional appId() { + return appId; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + @JsonIgnore + public Optional serviceId() { + return serviceId; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + @JsonIgnore + public Optional raw() { + return raw; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + @JsonIgnore + public Optional companyId() { + return companyId; + } + + @JsonIgnore + public SalesReceiptInput salesReceipt() { + return salesReceipt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ID of the record you are acting upon. + */ + public AccountingSalesReceiptsUpdateRequest withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsUpdateRequest withConsumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public AccountingSalesReceiptsUpdateRequest withConsumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsUpdateRequest withAppId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + + /** + * The ID of your Unify application + */ + public AccountingSalesReceiptsUpdateRequest withAppId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsUpdateRequest withServiceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public AccountingSalesReceiptsUpdateRequest withServiceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsUpdateRequest withRaw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public AccountingSalesReceiptsUpdateRequest withRaw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsUpdateRequest withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public AccountingSalesReceiptsUpdateRequest withCompanyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public AccountingSalesReceiptsUpdateRequest withSalesReceipt(SalesReceiptInput salesReceipt) { + Utils.checkNotNull(salesReceipt, "salesReceipt"); + this.salesReceipt = salesReceipt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsUpdateRequest other = (AccountingSalesReceiptsUpdateRequest) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && + Utils.enhancedDeepEquals(this.appId, other.appId) && + Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && + Utils.enhancedDeepEquals(this.raw, other.raw) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.salesReceipt, other.salesReceipt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, consumerId, appId, + serviceId, raw, companyId, + salesReceipt); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsUpdateRequest.class, + "id", id, + "consumerId", consumerId, + "appId", appId, + "serviceId", serviceId, + "raw", raw, + "companyId", companyId, + "salesReceipt", salesReceipt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Optional consumerId = Optional.empty(); + + private Optional appId = Optional.empty(); + + private Optional serviceId = Optional.empty(); + + private Optional raw; + + private Optional companyId = Optional.empty(); + + private SalesReceiptInput salesReceipt; + + private Builder() { + // force use of static builder() method + } + + + /** + * ID of the record you are acting upon. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(String consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = Optional.ofNullable(consumerId); + return this; + } + + /** + * ID of the consumer which you want to get or push data from + */ + public Builder consumerId(Optional consumerId) { + Utils.checkNotNull(consumerId, "consumerId"); + this.consumerId = consumerId; + return this; + } + + + /** + * The ID of your Unify application + */ + public Builder appId(String appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = Optional.ofNullable(appId); + return this; + } + + /** + * The ID of your Unify application + */ + public Builder appId(Optional appId) { + Utils.checkNotNull(appId, "appId"); + this.appId = appId; + return this; + } + + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(String serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = Optional.ofNullable(serviceId); + return this; + } + + /** + * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated + * multiple integrations for a Unified API. + */ + public Builder serviceId(Optional serviceId) { + Utils.checkNotNull(serviceId, "serviceId"); + this.serviceId = serviceId; + return this; + } + + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(boolean raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = Optional.ofNullable(raw); + return this; + } + + /** + * Include raw response. Mostly used for debugging purposes + */ + public Builder raw(Optional raw) { + Utils.checkNotNull(raw, "raw"); + this.raw = raw; + return this; + } + + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = Optional.ofNullable(companyId); + return this; + } + + /** + * The ID of the company to scope requests to. For connectors that support multi-company, this + * overrides the default company configured in connection settings. + */ + public Builder companyId(Optional companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + public Builder salesReceipt(SalesReceiptInput salesReceipt) { + Utils.checkNotNull(salesReceipt, "salesReceipt"); + this.salesReceipt = salesReceipt; + return this; + } + + public AccountingSalesReceiptsUpdateRequest build() { + if (raw == null) { + raw = _SINGLETON_VALUE_Raw.value(); + } + + return new AccountingSalesReceiptsUpdateRequest( + id, consumerId, appId, + serviceId, raw, companyId, + salesReceipt); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_Raw = + new LazySingletonValue<>( + "raw", + "false", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequestBuilder.java new file mode 100644 index 000000000..ad95a2ed1 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequestBuilder.java @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.operations.AccountingSalesReceiptsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; + +public class AccountingSalesReceiptsUpdateRequestBuilder { + + private AccountingSalesReceiptsUpdateRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsUpdateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsUpdateRequestBuilder request(AccountingSalesReceiptsUpdateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsUpdateRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsUpdateRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public AccountingSalesReceiptsUpdateResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation operation + = new AccountingSalesReceiptsUpdate.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateResponse.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateResponse.java new file mode 100644 index 000000000..0540d439d --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations; + +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.components.UpdateSalesReceiptResponse; +import com.apideck.unify.utils.Response; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsUpdateResponse 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; + + /** + * SalesReceipt updated + */ + private Optional updateSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional updateSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.updateSalesReceiptResponse = updateSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt updated + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional updateSalesReceiptResponse() { + return (Optional) updateSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsUpdateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsUpdateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsUpdateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt updated + */ + public AccountingSalesReceiptsUpdateResponse withUpdateSalesReceiptResponse(UpdateSalesReceiptResponse updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = Optional.ofNullable(updateSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt updated + */ + public AccountingSalesReceiptsUpdateResponse withUpdateSalesReceiptResponse(Optional updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = updateSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsUpdateResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsUpdateResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsUpdateResponse other = (AccountingSalesReceiptsUpdateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.updateSalesReceiptResponse, other.updateSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + updateSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsUpdateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "updateSalesReceiptResponse", updateSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional updateSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt updated + */ + public Builder updateSalesReceiptResponse(UpdateSalesReceiptResponse updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = Optional.ofNullable(updateSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt updated + */ + public Builder updateSalesReceiptResponse(Optional updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = updateSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsUpdateResponse build() { + + return new AccountingSalesReceiptsUpdateResponse( + contentType, statusCode, rawResponse, + updateSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadRequest.java b/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadRequest.java index 9d27bbd25..8fa80a489 100644 --- a/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadRequest.java @@ -3,10 +3,13 @@ */ package com.apideck.unify.models.operations; +import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.util.Optional; @@ -53,29 +56,43 @@ public class FileStorageFilesDownloadRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=fields") private JsonNullable fields; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + @JsonCreator public FileStorageFilesDownloadRequest( String id, Optional consumerId, Optional appId, Optional serviceId, - JsonNullable fields) { + JsonNullable fields, + Optional followRedirects) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(fields, "fields"); + Utils.checkNotNull(followRedirects, "followRedirects"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.fields = fields; + this.followRedirects = followRedirects; } public FileStorageFilesDownloadRequest( String id) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), JsonNullable.undefined()); + Optional.empty(), JsonNullable.undefined(), Optional.empty()); } /** @@ -127,6 +144,19 @@ public JsonNullable fields() { return fields; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + public static Builder builder() { return new Builder(); } @@ -234,6 +264,35 @@ public FileStorageFilesDownloadRequest withFields(JsonNullable fields) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public FileStorageFilesDownloadRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public FileStorageFilesDownloadRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -248,14 +307,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.consumerId, other.consumerId) && Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && - Utils.enhancedDeepEquals(this.fields, other.fields); + Utils.enhancedDeepEquals(this.fields, other.fields) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, fields); + serviceId, fields, followRedirects); } @Override @@ -265,7 +325,8 @@ public String toString() { "consumerId", consumerId, "appId", appId, "serviceId", serviceId, - "fields", fields); + "fields", fields, + "followRedirects", followRedirects); } @SuppressWarnings("UnusedReturnValue") @@ -281,6 +342,8 @@ public final static class Builder { private JsonNullable fields = JsonNullable.undefined(); + private Optional followRedirects; + private Builder() { // force use of static builder() method } @@ -389,12 +452,50 @@ public Builder fields(JsonNullable fields) { return this; } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + public FileStorageFilesDownloadRequest build() { + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new FileStorageFilesDownloadRequest( id, consumerId, appId, - serviceId, fields); + serviceId, fields, followRedirects); } + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadResponse.java b/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadResponse.java index b189ee593..c231f7741 100644 --- a/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/FileStorageFilesDownloadResponse.java @@ -34,7 +34,9 @@ public class FileStorageFilesDownloadResponse implements Response { private HttpResponse rawResponse; /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ private Optional getFileDownloadResponse; @@ -95,7 +97,9 @@ public HttpResponse rawResponse() { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -145,7 +149,9 @@ public FileStorageFilesDownloadResponse withRawResponse(HttpResponse getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -265,7 +273,9 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(InputStream getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -274,7 +284,9 @@ public Builder getFileDownloadResponse(InputStream getFileDownloadResponse) { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); diff --git a/src/main/java/com/apideck/unify/models/operations/FileStorageFilesExportResponse.java b/src/main/java/com/apideck/unify/models/operations/FileStorageFilesExportResponse.java index 2a46706a3..6acec791b 100644 --- a/src/main/java/com/apideck/unify/models/operations/FileStorageFilesExportResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/FileStorageFilesExportResponse.java @@ -34,7 +34,9 @@ public class FileStorageFilesExportResponse implements Response { private HttpResponse rawResponse; /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ private Optional getFileDownloadResponse; @@ -95,7 +97,9 @@ public HttpResponse rawResponse() { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -145,7 +149,9 @@ public FileStorageFilesExportResponse withRawResponse(HttpResponse } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public FileStorageFilesExportResponse withGetFileDownloadResponse(InputStream getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -155,7 +161,9 @@ public FileStorageFilesExportResponse withGetFileDownloadResponse(InputStream ge /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public FileStorageFilesExportResponse withGetFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -265,7 +273,9 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(InputStream getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -274,7 +284,9 @@ public Builder getFileDownloadResponse(InputStream getFileDownloadResponse) { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyRequest.java b/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyRequest.java index 746290f77..34b0e3447 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyRequest.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -60,6 +61,17 @@ public class ProxyDeleteProxyRequest { @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-timeout") private Optional timeout; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + @JsonCreator public ProxyDeleteProxyRequest( Optional consumerId, @@ -68,7 +80,8 @@ public ProxyDeleteProxyRequest( Optional unifiedApi, String downstreamUrl, Optional downstreamAuthorization, - Optional timeout) { + Optional timeout, + Optional followRedirects) { Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); @@ -76,6 +89,7 @@ public ProxyDeleteProxyRequest( Utils.checkNotNull(downstreamUrl, "downstreamUrl"); Utils.checkNotNull(downstreamAuthorization, "downstreamAuthorization"); Utils.checkNotNull(timeout, "timeout"); + Utils.checkNotNull(followRedirects, "followRedirects"); this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; @@ -83,6 +97,7 @@ public ProxyDeleteProxyRequest( this.downstreamUrl = downstreamUrl; this.downstreamAuthorization = downstreamAuthorization; this.timeout = timeout; + this.followRedirects = followRedirects; } public ProxyDeleteProxyRequest( @@ -90,7 +105,7 @@ public ProxyDeleteProxyRequest( String downstreamUrl) { this(Optional.empty(), Optional.empty(), serviceId, Optional.empty(), downstreamUrl, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -151,6 +166,19 @@ public Optional timeout() { return timeout; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + public static Builder builder() { return new Builder(); } @@ -272,6 +300,35 @@ public ProxyDeleteProxyRequest withTimeout(Optional timeout) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyDeleteProxyRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyDeleteProxyRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -288,7 +345,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.unifiedApi, other.unifiedApi) && Utils.enhancedDeepEquals(this.downstreamUrl, other.downstreamUrl) && Utils.enhancedDeepEquals(this.downstreamAuthorization, other.downstreamAuthorization) && - Utils.enhancedDeepEquals(this.timeout, other.timeout); + Utils.enhancedDeepEquals(this.timeout, other.timeout) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects); } @Override @@ -296,7 +354,7 @@ public int hashCode() { return Utils.enhancedHash( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout); + timeout, followRedirects); } @Override @@ -308,7 +366,8 @@ public String toString() { "unifiedApi", unifiedApi, "downstreamUrl", downstreamUrl, "downstreamAuthorization", downstreamAuthorization, - "timeout", timeout); + "timeout", timeout, + "followRedirects", followRedirects); } @SuppressWarnings("UnusedReturnValue") @@ -328,6 +387,8 @@ public final static class Builder { private Optional timeout; + private Optional followRedirects; + private Builder() { // force use of static builder() method } @@ -450,15 +511,47 @@ public Builder timeout(Optional timeout) { return this; } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + public ProxyDeleteProxyRequest build() { if (timeout == null) { timeout = _SINGLETON_VALUE_Timeout.value(); } + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new ProxyDeleteProxyRequest( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout); + timeout, followRedirects); } @@ -467,5 +560,11 @@ public ProxyDeleteProxyRequest build() { "timeout", "28000", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyResponse.java index 21236df0e..7216da807 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyDeleteProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyDeleteProxyResponse implements Response { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyDeleteProxyResponse withRawResponse(HttpResponse rawRes } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyDeleteProxyResponse withResponseJson(Map responseJso /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyDeleteProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyDeleteProxyResponse withResponseBinary(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyDeleteProxyResponse withResponsePdf(Optional } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyDeleteProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyDeleteProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyDeleteProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyDeleteProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyDeleteProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(InputStream responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(InputStream responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(InputStream responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyRequest.java b/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyRequest.java index 2db80fdd5..19e9d5edd 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyRequest.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -60,6 +61,17 @@ public class ProxyGetProxyRequest { @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-timeout") private Optional timeout; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + @JsonCreator public ProxyGetProxyRequest( Optional consumerId, @@ -68,7 +80,8 @@ public ProxyGetProxyRequest( Optional unifiedApi, String downstreamUrl, Optional downstreamAuthorization, - Optional timeout) { + Optional timeout, + Optional followRedirects) { Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); @@ -76,6 +89,7 @@ public ProxyGetProxyRequest( Utils.checkNotNull(downstreamUrl, "downstreamUrl"); Utils.checkNotNull(downstreamAuthorization, "downstreamAuthorization"); Utils.checkNotNull(timeout, "timeout"); + Utils.checkNotNull(followRedirects, "followRedirects"); this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; @@ -83,6 +97,7 @@ public ProxyGetProxyRequest( this.downstreamUrl = downstreamUrl; this.downstreamAuthorization = downstreamAuthorization; this.timeout = timeout; + this.followRedirects = followRedirects; } public ProxyGetProxyRequest( @@ -90,7 +105,7 @@ public ProxyGetProxyRequest( String downstreamUrl) { this(Optional.empty(), Optional.empty(), serviceId, Optional.empty(), downstreamUrl, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -151,6 +166,19 @@ public Optional timeout() { return timeout; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + public static Builder builder() { return new Builder(); } @@ -272,6 +300,35 @@ public ProxyGetProxyRequest withTimeout(Optional timeout) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyGetProxyRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyGetProxyRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -288,7 +345,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.unifiedApi, other.unifiedApi) && Utils.enhancedDeepEquals(this.downstreamUrl, other.downstreamUrl) && Utils.enhancedDeepEquals(this.downstreamAuthorization, other.downstreamAuthorization) && - Utils.enhancedDeepEquals(this.timeout, other.timeout); + Utils.enhancedDeepEquals(this.timeout, other.timeout) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects); } @Override @@ -296,7 +354,7 @@ public int hashCode() { return Utils.enhancedHash( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout); + timeout, followRedirects); } @Override @@ -308,7 +366,8 @@ public String toString() { "unifiedApi", unifiedApi, "downstreamUrl", downstreamUrl, "downstreamAuthorization", downstreamAuthorization, - "timeout", timeout); + "timeout", timeout, + "followRedirects", followRedirects); } @SuppressWarnings("UnusedReturnValue") @@ -328,6 +387,8 @@ public final static class Builder { private Optional timeout; + private Optional followRedirects; + private Builder() { // force use of static builder() method } @@ -450,15 +511,47 @@ public Builder timeout(Optional timeout) { return this; } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + public ProxyGetProxyRequest build() { if (timeout == null) { timeout = _SINGLETON_VALUE_Timeout.value(); } + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new ProxyGetProxyRequest( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout); + timeout, followRedirects); } @@ -467,5 +560,11 @@ public ProxyGetProxyRequest build() { "timeout", "28000", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyResponse.java index 8a414b5a1..e15117552 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyGetProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyGetProxyResponse implements Response { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyGetProxyResponse withRawResponse(HttpResponse rawRespon } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyGetProxyResponse withResponseJson(Map responseJson) /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyGetProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyGetProxyResponse withResponseBinary(Optional } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyGetProxyResponse withResponsePdf(InputStream responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyGetProxyResponse withResponsePdf(Optional res } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyGetProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyGetProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyGetProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyGetProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyGetProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(InputStream responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(InputStream responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(InputStream responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyRequest.java b/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyRequest.java index 44fb43f9c..39a02ce3c 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyRequest.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -60,6 +61,17 @@ public class ProxyOptionsProxyRequest { @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-timeout") private Optional timeout; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + @JsonCreator public ProxyOptionsProxyRequest( Optional consumerId, @@ -68,7 +80,8 @@ public ProxyOptionsProxyRequest( Optional unifiedApi, String downstreamUrl, Optional downstreamAuthorization, - Optional timeout) { + Optional timeout, + Optional followRedirects) { Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); @@ -76,6 +89,7 @@ public ProxyOptionsProxyRequest( Utils.checkNotNull(downstreamUrl, "downstreamUrl"); Utils.checkNotNull(downstreamAuthorization, "downstreamAuthorization"); Utils.checkNotNull(timeout, "timeout"); + Utils.checkNotNull(followRedirects, "followRedirects"); this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; @@ -83,6 +97,7 @@ public ProxyOptionsProxyRequest( this.downstreamUrl = downstreamUrl; this.downstreamAuthorization = downstreamAuthorization; this.timeout = timeout; + this.followRedirects = followRedirects; } public ProxyOptionsProxyRequest( @@ -90,7 +105,7 @@ public ProxyOptionsProxyRequest( String downstreamUrl) { this(Optional.empty(), Optional.empty(), serviceId, Optional.empty(), downstreamUrl, Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -151,6 +166,19 @@ public Optional timeout() { return timeout; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + public static Builder builder() { return new Builder(); } @@ -272,6 +300,35 @@ public ProxyOptionsProxyRequest withTimeout(Optional timeout) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyOptionsProxyRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyOptionsProxyRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -288,7 +345,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.unifiedApi, other.unifiedApi) && Utils.enhancedDeepEquals(this.downstreamUrl, other.downstreamUrl) && Utils.enhancedDeepEquals(this.downstreamAuthorization, other.downstreamAuthorization) && - Utils.enhancedDeepEquals(this.timeout, other.timeout); + Utils.enhancedDeepEquals(this.timeout, other.timeout) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects); } @Override @@ -296,7 +354,7 @@ public int hashCode() { return Utils.enhancedHash( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout); + timeout, followRedirects); } @Override @@ -308,7 +366,8 @@ public String toString() { "unifiedApi", unifiedApi, "downstreamUrl", downstreamUrl, "downstreamAuthorization", downstreamAuthorization, - "timeout", timeout); + "timeout", timeout, + "followRedirects", followRedirects); } @SuppressWarnings("UnusedReturnValue") @@ -328,6 +387,8 @@ public final static class Builder { private Optional timeout; + private Optional followRedirects; + private Builder() { // force use of static builder() method } @@ -450,15 +511,47 @@ public Builder timeout(Optional timeout) { return this; } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + public ProxyOptionsProxyRequest build() { if (timeout == null) { timeout = _SINGLETON_VALUE_Timeout.value(); } + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new ProxyOptionsProxyRequest( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout); + timeout, followRedirects); } @@ -467,5 +560,11 @@ public ProxyOptionsProxyRequest build() { "timeout", "28000", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyResponse.java index c7b418c79..84684bd11 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyOptionsProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyOptionsProxyResponse implements Response { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyOptionsProxyResponse withRawResponse(HttpResponse rawRe } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyOptionsProxyResponse withResponseJson(Map responseJs /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyOptionsProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyOptionsProxyResponse withResponseBinary(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyOptionsProxyResponse withResponsePdf(Optional } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyOptionsProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyOptionsProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyOptionsProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyOptionsProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyOptionsProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(InputStream responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(InputStream responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(InputStream responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyRequest.java b/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyRequest.java index acee11021..b0c5d0ac1 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyRequest.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -60,6 +61,17 @@ public class ProxyPatchProxyRequest { @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-timeout") private Optional timeout; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -76,6 +88,7 @@ public ProxyPatchProxyRequest( String downstreamUrl, Optional downstreamAuthorization, Optional timeout, + Optional followRedirects, Optional requestBody) { Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); @@ -84,6 +97,7 @@ public ProxyPatchProxyRequest( Utils.checkNotNull(downstreamUrl, "downstreamUrl"); Utils.checkNotNull(downstreamAuthorization, "downstreamAuthorization"); Utils.checkNotNull(timeout, "timeout"); + Utils.checkNotNull(followRedirects, "followRedirects"); Utils.checkNotNull(requestBody, "requestBody"); this.consumerId = consumerId; this.appId = appId; @@ -92,6 +106,7 @@ public ProxyPatchProxyRequest( this.downstreamUrl = downstreamUrl; this.downstreamAuthorization = downstreamAuthorization; this.timeout = timeout; + this.followRedirects = followRedirects; this.requestBody = requestBody; } @@ -100,7 +115,7 @@ public ProxyPatchProxyRequest( String downstreamUrl) { this(Optional.empty(), Optional.empty(), serviceId, Optional.empty(), downstreamUrl, Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -161,6 +176,19 @@ public Optional timeout() { return timeout; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -291,6 +319,35 @@ public ProxyPatchProxyRequest withTimeout(Optional timeout) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyPatchProxyRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyPatchProxyRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -329,6 +386,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.downstreamUrl, other.downstreamUrl) && Utils.enhancedDeepEquals(this.downstreamAuthorization, other.downstreamAuthorization) && Utils.enhancedDeepEquals(this.timeout, other.timeout) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects) && Utils.enhancedDeepEquals(this.requestBody, other.requestBody); } @@ -337,7 +395,7 @@ public int hashCode() { return Utils.enhancedHash( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout, requestBody); + timeout, followRedirects, requestBody); } @Override @@ -350,6 +408,7 @@ public String toString() { "downstreamUrl", downstreamUrl, "downstreamAuthorization", downstreamAuthorization, "timeout", timeout, + "followRedirects", followRedirects, "requestBody", requestBody); } @@ -370,6 +429,8 @@ public final static class Builder { private Optional timeout; + private Optional followRedirects; + private Optional requestBody = Optional.empty(); private Builder() { @@ -495,6 +556,35 @@ public Builder timeout(Optional timeout) { } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -519,11 +609,14 @@ public ProxyPatchProxyRequest build() { if (timeout == null) { timeout = _SINGLETON_VALUE_Timeout.value(); } + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new ProxyPatchProxyRequest( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout, requestBody); + timeout, followRedirects, requestBody); } @@ -532,5 +625,11 @@ public ProxyPatchProxyRequest build() { "timeout", "28000", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyResponse.java index 0bab812d6..ca5ca8f44 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyPatchProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyPatchProxyResponse implements Response { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyPatchProxyResponse withRawResponse(HttpResponse rawResp } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyPatchProxyResponse withResponseJson(Map responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyPatchProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyPatchProxyResponse withResponseBinary(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyPatchProxyResponse withResponsePdf(Optional r } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyPatchProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyPatchProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyPatchProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyPatchProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyPatchProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(InputStream responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(InputStream responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(InputStream responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyRequest.java b/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyRequest.java index 5021f9375..02bc7e301 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyRequest.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -60,6 +61,17 @@ public class ProxyPostProxyRequest { @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-timeout") private Optional timeout; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -76,6 +88,7 @@ public ProxyPostProxyRequest( String downstreamUrl, Optional downstreamAuthorization, Optional timeout, + Optional followRedirects, Optional requestBody) { Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); @@ -84,6 +97,7 @@ public ProxyPostProxyRequest( Utils.checkNotNull(downstreamUrl, "downstreamUrl"); Utils.checkNotNull(downstreamAuthorization, "downstreamAuthorization"); Utils.checkNotNull(timeout, "timeout"); + Utils.checkNotNull(followRedirects, "followRedirects"); Utils.checkNotNull(requestBody, "requestBody"); this.consumerId = consumerId; this.appId = appId; @@ -92,6 +106,7 @@ public ProxyPostProxyRequest( this.downstreamUrl = downstreamUrl; this.downstreamAuthorization = downstreamAuthorization; this.timeout = timeout; + this.followRedirects = followRedirects; this.requestBody = requestBody; } @@ -100,7 +115,7 @@ public ProxyPostProxyRequest( String downstreamUrl) { this(Optional.empty(), Optional.empty(), serviceId, Optional.empty(), downstreamUrl, Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -161,6 +176,19 @@ public Optional timeout() { return timeout; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -291,6 +319,35 @@ public ProxyPostProxyRequest withTimeout(Optional timeout) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyPostProxyRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyPostProxyRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -329,6 +386,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.downstreamUrl, other.downstreamUrl) && Utils.enhancedDeepEquals(this.downstreamAuthorization, other.downstreamAuthorization) && Utils.enhancedDeepEquals(this.timeout, other.timeout) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects) && Utils.enhancedDeepEquals(this.requestBody, other.requestBody); } @@ -337,7 +395,7 @@ public int hashCode() { return Utils.enhancedHash( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout, requestBody); + timeout, followRedirects, requestBody); } @Override @@ -350,6 +408,7 @@ public String toString() { "downstreamUrl", downstreamUrl, "downstreamAuthorization", downstreamAuthorization, "timeout", timeout, + "followRedirects", followRedirects, "requestBody", requestBody); } @@ -370,6 +429,8 @@ public final static class Builder { private Optional timeout; + private Optional followRedirects; + private Optional requestBody = Optional.empty(); private Builder() { @@ -495,6 +556,35 @@ public Builder timeout(Optional timeout) { } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -519,11 +609,14 @@ public ProxyPostProxyRequest build() { if (timeout == null) { timeout = _SINGLETON_VALUE_Timeout.value(); } + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new ProxyPostProxyRequest( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout, requestBody); + timeout, followRedirects, requestBody); } @@ -532,5 +625,11 @@ public ProxyPostProxyRequest build() { "timeout", "28000", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyResponse.java index 75b8e5c87..c5bfcf42b 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyPostProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyPostProxyResponse implements Response { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyPostProxyResponse withRawResponse(HttpResponse rawRespo } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyPostProxyResponse withResponseJson(Map responseJson) /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyPostProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyPostProxyResponse withResponseBinary(Optional } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyPostProxyResponse withResponsePdf(InputStream responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyPostProxyResponse withResponsePdf(Optional re } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyPostProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyPostProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyPostProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyPostProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyPostProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(InputStream responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(InputStream responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(InputStream responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyRequest.java b/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyRequest.java index 9b229e01f..f99aab15d 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyRequest.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -60,6 +61,17 @@ public class ProxyPutProxyRequest { @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-timeout") private Optional timeout; + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-apideck-follow-redirects") + private Optional followRedirects; + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -76,6 +88,7 @@ public ProxyPutProxyRequest( String downstreamUrl, Optional downstreamAuthorization, Optional timeout, + Optional followRedirects, Optional requestBody) { Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); @@ -84,6 +97,7 @@ public ProxyPutProxyRequest( Utils.checkNotNull(downstreamUrl, "downstreamUrl"); Utils.checkNotNull(downstreamAuthorization, "downstreamAuthorization"); Utils.checkNotNull(timeout, "timeout"); + Utils.checkNotNull(followRedirects, "followRedirects"); Utils.checkNotNull(requestBody, "requestBody"); this.consumerId = consumerId; this.appId = appId; @@ -92,6 +106,7 @@ public ProxyPutProxyRequest( this.downstreamUrl = downstreamUrl; this.downstreamAuthorization = downstreamAuthorization; this.timeout = timeout; + this.followRedirects = followRedirects; this.requestBody = requestBody; } @@ -100,7 +115,7 @@ public ProxyPutProxyRequest( String downstreamUrl) { this(Optional.empty(), Optional.empty(), serviceId, Optional.empty(), downstreamUrl, Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -161,6 +176,19 @@ public Optional timeout() { return timeout; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + @JsonIgnore + public Optional followRedirects() { + return followRedirects; + } + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -291,6 +319,35 @@ public ProxyPutProxyRequest withTimeout(Optional timeout) { return this; } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyPutProxyRequest withFollowRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public ProxyPutProxyRequest withFollowRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -329,6 +386,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.downstreamUrl, other.downstreamUrl) && Utils.enhancedDeepEquals(this.downstreamAuthorization, other.downstreamAuthorization) && Utils.enhancedDeepEquals(this.timeout, other.timeout) && + Utils.enhancedDeepEquals(this.followRedirects, other.followRedirects) && Utils.enhancedDeepEquals(this.requestBody, other.requestBody); } @@ -337,7 +395,7 @@ public int hashCode() { return Utils.enhancedHash( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout, requestBody); + timeout, followRedirects, requestBody); } @Override @@ -350,6 +408,7 @@ public String toString() { "downstreamUrl", downstreamUrl, "downstreamAuthorization", downstreamAuthorization, "timeout", timeout, + "followRedirects", followRedirects, "requestBody", requestBody); } @@ -370,6 +429,8 @@ public final static class Builder { private Optional timeout; + private Optional followRedirects; + private Optional requestBody = Optional.empty(); private Builder() { @@ -495,6 +556,35 @@ public Builder timeout(Optional timeout) { } + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(boolean followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = Optional.ofNullable(followRedirects); + return this; + } + + /** + * Set to `false` to opt out of the redirect to the presigned download URL. Instead of a `30x` + * response, you receive a `200` JSON body `{ url, expires_at }` containing the URL and its expiry, + * which you can fetch explicitly. Use this if your client automatically forwards the `Authorization` + * header onto redirects, since the downstream storage provider will reject that request. + * + *

Any value other than `false` (or omitting the header) preserves the default redirect behavior. + */ + public Builder followRedirects(Optional followRedirects) { + Utils.checkNotNull(followRedirects, "followRedirects"); + this.followRedirects = followRedirects; + return this; + } + + /** * Depending on the verb/method of the request this will contain the request body you want to * POST/PATCH/PUT. @@ -519,11 +609,14 @@ public ProxyPutProxyRequest build() { if (timeout == null) { timeout = _SINGLETON_VALUE_Timeout.value(); } + if (followRedirects == null) { + followRedirects = _SINGLETON_VALUE_FollowRedirects.value(); + } return new ProxyPutProxyRequest( consumerId, appId, serviceId, unifiedApi, downstreamUrl, downstreamAuthorization, - timeout, requestBody); + timeout, followRedirects, requestBody); } @@ -532,5 +625,11 @@ public ProxyPutProxyRequest build() { "timeout", "28000", new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_FollowRedirects = + new LazySingletonValue<>( + "followRedirects", + "true", + new TypeReference>() {}); } } diff --git a/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyResponse.java index e569f7a78..40f5aea0c 100644 --- a/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/ProxyPutProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyPutProxyResponse implements Response { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyPutProxyResponse withRawResponse(HttpResponse rawRespon } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyPutProxyResponse withResponseJson(Map responseJson) /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyPutProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyPutProxyResponse withResponseBinary(Optional } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyPutProxyResponse withResponsePdf(InputStream responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyPutProxyResponse withResponsePdf(Optional res } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyPutProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyPutProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyPutProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyPutProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyPutProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(InputStream responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(InputStream responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(InputStream responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(InputStream responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingAttachmentsDownloadResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingAttachmentsDownloadResponse.java index 8a7bfd685..a6da5184f 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/AccountingAttachmentsDownloadResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingAttachmentsDownloadResponse.java @@ -34,7 +34,10 @@ public class AccountingAttachmentsDownloadResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ private Optional getAttachmentDownloadResponse; @@ -95,7 +98,10 @@ public HttpResponse rawResponse() { } /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -145,7 +151,10 @@ public AccountingAttachmentsDownloadResponse withRawResponse(HttpResponse } /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ public AccountingAttachmentsDownloadResponse withGetAttachmentDownloadResponse(Blob getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); @@ -155,7 +164,10 @@ public AccountingAttachmentsDownloadResponse withGetAttachmentDownloadResponse(B /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ public AccountingAttachmentsDownloadResponse withGetAttachmentDownloadResponse(Optional getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); @@ -265,7 +277,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ public Builder getAttachmentDownloadResponse(Blob getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); @@ -274,7 +289,10 @@ public Builder getAttachmentDownloadResponse(Blob getAttachmentDownloadResponse) } /** - * Attachment Download + * Attachment Download. When the request includes `x-apideck-follow-redirects: false` and the download + * would otherwise redirect to a presigned URL, the response body is instead an `application/json` + * object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve + * the attachment. */ public Builder getAttachmentDownloadResponse(Optional getAttachmentDownloadResponse) { Utils.checkNotNull(getAttachmentDownloadResponse, "getAttachmentDownloadResponse"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddRequestBuilder.java new file mode 100644 index 000000000..90b780d26 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddRequest; +import com.apideck.unify.operations.AccountingPaymentMethodsAdd; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingPaymentMethodsAddRequestBuilder { + + private AccountingPaymentMethodsAddRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsAddRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsAddRequestBuilder request(AccountingPaymentMethodsAddRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsAddRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsAddRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingPaymentMethodsAdd.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddResponse.java new file mode 100644 index 000000000..8e86801bd --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAddResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.CreatePaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsAddResponse 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; + + /** + * Payment Methods + */ + private Optional createPaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional createPaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.createPaymentMethodResponse = createPaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional createPaymentMethodResponse() { + return (Optional) createPaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsAddResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsAddResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsAddResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAddResponse withCreatePaymentMethodResponse(CreatePaymentMethodResponse createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = Optional.ofNullable(createPaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAddResponse withCreatePaymentMethodResponse(Optional createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = createPaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAddResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAddResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsAddResponse other = (AccountingPaymentMethodsAddResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.createPaymentMethodResponse, other.createPaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + createPaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsAddResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "createPaymentMethodResponse", createPaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional createPaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder createPaymentMethodResponse(CreatePaymentMethodResponse createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = Optional.ofNullable(createPaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder createPaymentMethodResponse(Optional createPaymentMethodResponse) { + Utils.checkNotNull(createPaymentMethodResponse, "createPaymentMethodResponse"); + this.createPaymentMethodResponse = createPaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsAddResponse build() { + + return new AccountingPaymentMethodsAddResponse( + contentType, statusCode, rawResponse, + createPaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllRequestBuilder.java new file mode 100644 index 000000000..b480148fb --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllRequestBuilder.java @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; +import static com.apideck.unify.utils.reactive.ReactiveUtils.mapAsync; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllRequest; +import com.apideck.unify.operations.AccountingPaymentMethodsAll; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.apideck.unify.utils.pagination.AsyncPaginator; +import com.apideck.unify.utils.pagination.CursorTracker; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Flow; +import org.reactivestreams.FlowAdapters; +import org.reactivestreams.Publisher; + +public class AccountingPaymentMethodsAllRequestBuilder { + + private AccountingPaymentMethodsAllRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsAllRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsAllRequestBuilder request(AccountingPaymentMethodsAllRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsAllRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsAllRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingPaymentMethodsAll.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** + * Returns a Publisher that performs next page calls till no more pages + * are returned. + * + *

The returned publisher can be used with reactive frameworks: + *


+     * Publisher<AccountingPaymentMethodsAllResponse> publisher = builder.callAsPublisher();
+     * publisher.subscribe(new Subscriber<AccountingPaymentMethodsAllResponse>() {
+     *     // Handle onNext, onError, onComplete
+     * });
+     * 
+ * + * @return A Publisher that emits pages asynchronously + */ + public Publisher callAsPublisher() { + AccountingPaymentMethodsAllRequest request = this.request; + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingPaymentMethodsAll.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + Flow.Publisher> asyncPaginator = new AsyncPaginator<>( + request, + new CursorTracker<>("$.meta.cursors.next", String.class), + (req, pos) -> { + var modifiedReq = pos == null ? req : req.withCursor(pos); + return operation.doRequest(modifiedReq); + }); + + Flow.Publisher flowPublisher = mapAsync(asyncPaginator, operation::handleResponse); + + // Convert Flow.Publisher to Reactive Streams Publisher at the last stage + return FlowAdapters.toPublisher(flowPublisher); + } + +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllResponse.java new file mode 100644 index 000000000..6a55db528 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsAllResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.GetPaymentMethodsResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsAllResponse 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; + + /** + * Payment Methods + */ + private Optional getPaymentMethodsResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getPaymentMethodsResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getPaymentMethodsResponse = getPaymentMethodsResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getPaymentMethodsResponse() { + return (Optional) getPaymentMethodsResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsAllResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsAllResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsAllResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAllResponse withGetPaymentMethodsResponse(GetPaymentMethodsResponse getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = Optional.ofNullable(getPaymentMethodsResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsAllResponse withGetPaymentMethodsResponse(Optional getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = getPaymentMethodsResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAllResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsAllResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsAllResponse other = (AccountingPaymentMethodsAllResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getPaymentMethodsResponse, other.getPaymentMethodsResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getPaymentMethodsResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsAllResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getPaymentMethodsResponse", getPaymentMethodsResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getPaymentMethodsResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder getPaymentMethodsResponse(GetPaymentMethodsResponse getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = Optional.ofNullable(getPaymentMethodsResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder getPaymentMethodsResponse(Optional getPaymentMethodsResponse) { + Utils.checkNotNull(getPaymentMethodsResponse, "getPaymentMethodsResponse"); + this.getPaymentMethodsResponse = getPaymentMethodsResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsAllResponse build() { + + return new AccountingPaymentMethodsAllResponse( + contentType, statusCode, rawResponse, + getPaymentMethodsResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteRequestBuilder.java new file mode 100644 index 000000000..2c4770485 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteRequest; +import com.apideck.unify.operations.AccountingPaymentMethodsDelete; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingPaymentMethodsDeleteRequestBuilder { + + private AccountingPaymentMethodsDeleteRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsDeleteRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsDeleteRequestBuilder request(AccountingPaymentMethodsDeleteRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsDeleteRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsDeleteRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingPaymentMethodsDelete.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteResponse.java new file mode 100644 index 000000000..22f78428c --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsDeleteResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.DeletePaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsDeleteResponse 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; + + /** + * Payment Methods + */ + private Optional deletePaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional deletePaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.deletePaymentMethodResponse = deletePaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional deletePaymentMethodResponse() { + return (Optional) deletePaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsDeleteResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsDeleteResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsDeleteResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsDeleteResponse withDeletePaymentMethodResponse(DeletePaymentMethodResponse deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = Optional.ofNullable(deletePaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsDeleteResponse withDeletePaymentMethodResponse(Optional deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = deletePaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsDeleteResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsDeleteResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsDeleteResponse other = (AccountingPaymentMethodsDeleteResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.deletePaymentMethodResponse, other.deletePaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + deletePaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsDeleteResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "deletePaymentMethodResponse", deletePaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional deletePaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder deletePaymentMethodResponse(DeletePaymentMethodResponse deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = Optional.ofNullable(deletePaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder deletePaymentMethodResponse(Optional deletePaymentMethodResponse) { + Utils.checkNotNull(deletePaymentMethodResponse, "deletePaymentMethodResponse"); + this.deletePaymentMethodResponse = deletePaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsDeleteResponse build() { + + return new AccountingPaymentMethodsDeleteResponse( + contentType, statusCode, rawResponse, + deletePaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneRequestBuilder.java new file mode 100644 index 000000000..993a9c51a --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneRequest; +import com.apideck.unify.operations.AccountingPaymentMethodsOne; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingPaymentMethodsOneRequestBuilder { + + private AccountingPaymentMethodsOneRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsOneRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsOneRequestBuilder request(AccountingPaymentMethodsOneRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsOneRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsOneRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingPaymentMethodsOne.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneResponse.java new file mode 100644 index 000000000..8a1af9335 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsOneResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.GetPaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsOneResponse 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; + + /** + * Payment Methods + */ + private Optional getPaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getPaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getPaymentMethodResponse = getPaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getPaymentMethodResponse() { + return (Optional) getPaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsOneResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsOneResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsOneResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsOneResponse withGetPaymentMethodResponse(GetPaymentMethodResponse getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = Optional.ofNullable(getPaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsOneResponse withGetPaymentMethodResponse(Optional getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = getPaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsOneResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsOneResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsOneResponse other = (AccountingPaymentMethodsOneResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getPaymentMethodResponse, other.getPaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getPaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsOneResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getPaymentMethodResponse", getPaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getPaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder getPaymentMethodResponse(GetPaymentMethodResponse getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = Optional.ofNullable(getPaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder getPaymentMethodResponse(Optional getPaymentMethodResponse) { + Utils.checkNotNull(getPaymentMethodResponse, "getPaymentMethodResponse"); + this.getPaymentMethodResponse = getPaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsOneResponse build() { + + return new AccountingPaymentMethodsOneResponse( + contentType, statusCode, rawResponse, + getPaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateRequestBuilder.java new file mode 100644 index 000000000..45cf1fe78 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateRequest; +import com.apideck.unify.operations.AccountingPaymentMethodsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingPaymentMethodsUpdateRequestBuilder { + + private AccountingPaymentMethodsUpdateRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingPaymentMethodsUpdateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingPaymentMethodsUpdateRequestBuilder request(AccountingPaymentMethodsUpdateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingPaymentMethodsUpdateRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingPaymentMethodsUpdateRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingPaymentMethodsUpdate.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateResponse.java new file mode 100644 index 000000000..075bffc5f --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingPaymentMethodsUpdateResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.components.UpdatePaymentMethodResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingPaymentMethodsUpdateResponse 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; + + /** + * Payment Methods + */ + private Optional updatePaymentMethodResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingPaymentMethodsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional updatePaymentMethodResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.updatePaymentMethodResponse = updatePaymentMethodResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingPaymentMethodsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * Payment Methods + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional updatePaymentMethodResponse() { + return (Optional) updatePaymentMethodResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingPaymentMethodsUpdateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingPaymentMethodsUpdateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingPaymentMethodsUpdateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Payment Methods + */ + public AccountingPaymentMethodsUpdateResponse withUpdatePaymentMethodResponse(UpdatePaymentMethodResponse updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = Optional.ofNullable(updatePaymentMethodResponse); + return this; + } + + + /** + * Payment Methods + */ + public AccountingPaymentMethodsUpdateResponse withUpdatePaymentMethodResponse(Optional updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = updatePaymentMethodResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingPaymentMethodsUpdateResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingPaymentMethodsUpdateResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingPaymentMethodsUpdateResponse other = (AccountingPaymentMethodsUpdateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.updatePaymentMethodResponse, other.updatePaymentMethodResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + updatePaymentMethodResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingPaymentMethodsUpdateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "updatePaymentMethodResponse", updatePaymentMethodResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional updatePaymentMethodResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * Payment Methods + */ + public Builder updatePaymentMethodResponse(UpdatePaymentMethodResponse updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = Optional.ofNullable(updatePaymentMethodResponse); + return this; + } + + /** + * Payment Methods + */ + public Builder updatePaymentMethodResponse(Optional updatePaymentMethodResponse) { + Utils.checkNotNull(updatePaymentMethodResponse, "updatePaymentMethodResponse"); + this.updatePaymentMethodResponse = updatePaymentMethodResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingPaymentMethodsUpdateResponse build() { + + return new AccountingPaymentMethodsUpdateResponse( + contentType, statusCode, rawResponse, + updatePaymentMethodResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddRequestBuilder.java new file mode 100644 index 000000000..531bb1a32 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddRequest; +import com.apideck.unify.operations.AccountingSalesReceiptsAdd; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingSalesReceiptsAddRequestBuilder { + + private AccountingSalesReceiptsAddRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsAddRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsAddRequestBuilder request(AccountingSalesReceiptsAddRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsAddRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsAddRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingSalesReceiptsAdd.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddResponse.java new file mode 100644 index 000000000..9ed58ab66 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAddResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.CreateSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsAddResponse 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; + + /** + * SalesReceipt created + */ + private Optional createSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional createSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.createSalesReceiptResponse = createSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsAddResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt created + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional createSalesReceiptResponse() { + return (Optional) createSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsAddResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsAddResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsAddResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt created + */ + public AccountingSalesReceiptsAddResponse withCreateSalesReceiptResponse(CreateSalesReceiptResponse createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = Optional.ofNullable(createSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt created + */ + public AccountingSalesReceiptsAddResponse withCreateSalesReceiptResponse(Optional createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = createSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAddResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAddResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsAddResponse other = (AccountingSalesReceiptsAddResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.createSalesReceiptResponse, other.createSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + createSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsAddResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "createSalesReceiptResponse", createSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional createSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt created + */ + public Builder createSalesReceiptResponse(CreateSalesReceiptResponse createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = Optional.ofNullable(createSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt created + */ + public Builder createSalesReceiptResponse(Optional createSalesReceiptResponse) { + Utils.checkNotNull(createSalesReceiptResponse, "createSalesReceiptResponse"); + this.createSalesReceiptResponse = createSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsAddResponse build() { + + return new AccountingSalesReceiptsAddResponse( + contentType, statusCode, rawResponse, + createSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllRequestBuilder.java new file mode 100644 index 000000000..cf61edc45 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllRequestBuilder.java @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; +import static com.apideck.unify.utils.reactive.ReactiveUtils.mapAsync; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllRequest; +import com.apideck.unify.operations.AccountingSalesReceiptsAll; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.apideck.unify.utils.pagination.AsyncPaginator; +import com.apideck.unify.utils.pagination.CursorTracker; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Flow; +import org.reactivestreams.FlowAdapters; +import org.reactivestreams.Publisher; + +public class AccountingSalesReceiptsAllRequestBuilder { + + private AccountingSalesReceiptsAllRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsAllRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsAllRequestBuilder request(AccountingSalesReceiptsAllRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsAllRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsAllRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingSalesReceiptsAll.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** + * Returns a Publisher that performs next page calls till no more pages + * are returned. + * + *

The returned publisher can be used with reactive frameworks: + *


+     * Publisher<AccountingSalesReceiptsAllResponse> publisher = builder.callAsPublisher();
+     * publisher.subscribe(new Subscriber<AccountingSalesReceiptsAllResponse>() {
+     *     // Handle onNext, onError, onComplete
+     * });
+     * 
+ * + * @return A Publisher that emits pages asynchronously + */ + public Publisher callAsPublisher() { + AccountingSalesReceiptsAllRequest request = this.request; + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingSalesReceiptsAll.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + Flow.Publisher> asyncPaginator = new AsyncPaginator<>( + request, + new CursorTracker<>("$.meta.cursors.next", String.class), + (req, pos) -> { + var modifiedReq = pos == null ? req : req.withCursor(pos); + return operation.doRequest(modifiedReq); + }); + + Flow.Publisher flowPublisher = mapAsync(asyncPaginator, operation::handleResponse); + + // Convert Flow.Publisher to Reactive Streams Publisher at the last stage + return FlowAdapters.toPublisher(flowPublisher); + } + +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllResponse.java new file mode 100644 index 000000000..d838b53a2 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsAllResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.GetSalesReceiptsResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsAllResponse 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; + + /** + * SalesReceipts + */ + private Optional getSalesReceiptsResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getSalesReceiptsResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getSalesReceiptsResponse = getSalesReceiptsResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsAllResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipts + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getSalesReceiptsResponse() { + return (Optional) getSalesReceiptsResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsAllResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsAllResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsAllResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipts + */ + public AccountingSalesReceiptsAllResponse withGetSalesReceiptsResponse(GetSalesReceiptsResponse getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = Optional.ofNullable(getSalesReceiptsResponse); + return this; + } + + + /** + * SalesReceipts + */ + public AccountingSalesReceiptsAllResponse withGetSalesReceiptsResponse(Optional getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = getSalesReceiptsResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAllResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsAllResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsAllResponse other = (AccountingSalesReceiptsAllResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSalesReceiptsResponse, other.getSalesReceiptsResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSalesReceiptsResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsAllResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSalesReceiptsResponse", getSalesReceiptsResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getSalesReceiptsResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipts + */ + public Builder getSalesReceiptsResponse(GetSalesReceiptsResponse getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = Optional.ofNullable(getSalesReceiptsResponse); + return this; + } + + /** + * SalesReceipts + */ + public Builder getSalesReceiptsResponse(Optional getSalesReceiptsResponse) { + Utils.checkNotNull(getSalesReceiptsResponse, "getSalesReceiptsResponse"); + this.getSalesReceiptsResponse = getSalesReceiptsResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsAllResponse build() { + + return new AccountingSalesReceiptsAllResponse( + contentType, statusCode, rawResponse, + getSalesReceiptsResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteRequestBuilder.java new file mode 100644 index 000000000..d3c2c6a3b --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteRequest; +import com.apideck.unify.operations.AccountingSalesReceiptsDelete; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingSalesReceiptsDeleteRequestBuilder { + + private AccountingSalesReceiptsDeleteRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsDeleteRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsDeleteRequestBuilder request(AccountingSalesReceiptsDeleteRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsDeleteRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsDeleteRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingSalesReceiptsDelete.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteResponse.java new file mode 100644 index 000000000..6f651b7ba --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsDeleteResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.DeleteSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsDeleteResponse 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; + + /** + * SalesReceipt deleted + */ + private Optional deleteSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional deleteSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.deleteSalesReceiptResponse = deleteSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsDeleteResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt deleted + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional deleteSalesReceiptResponse() { + return (Optional) deleteSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsDeleteResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsDeleteResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsDeleteResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt deleted + */ + public AccountingSalesReceiptsDeleteResponse withDeleteSalesReceiptResponse(DeleteSalesReceiptResponse deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = Optional.ofNullable(deleteSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt deleted + */ + public AccountingSalesReceiptsDeleteResponse withDeleteSalesReceiptResponse(Optional deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = deleteSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsDeleteResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsDeleteResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsDeleteResponse other = (AccountingSalesReceiptsDeleteResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.deleteSalesReceiptResponse, other.deleteSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + deleteSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsDeleteResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "deleteSalesReceiptResponse", deleteSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional deleteSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt deleted + */ + public Builder deleteSalesReceiptResponse(DeleteSalesReceiptResponse deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = Optional.ofNullable(deleteSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt deleted + */ + public Builder deleteSalesReceiptResponse(Optional deleteSalesReceiptResponse) { + Utils.checkNotNull(deleteSalesReceiptResponse, "deleteSalesReceiptResponse"); + this.deleteSalesReceiptResponse = deleteSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsDeleteResponse build() { + + return new AccountingSalesReceiptsDeleteResponse( + contentType, statusCode, rawResponse, + deleteSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneRequestBuilder.java new file mode 100644 index 000000000..a5b8aa72e --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneRequest; +import com.apideck.unify.operations.AccountingSalesReceiptsOne; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingSalesReceiptsOneRequestBuilder { + + private AccountingSalesReceiptsOneRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsOneRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsOneRequestBuilder request(AccountingSalesReceiptsOneRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsOneRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsOneRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingSalesReceiptsOne.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneResponse.java new file mode 100644 index 000000000..e369307d3 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsOneResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.GetSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsOneResponse 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; + + /** + * SalesReceipt + */ + private Optional getSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional getSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.getSalesReceiptResponse = getSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsOneResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getSalesReceiptResponse() { + return (Optional) getSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsOneResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsOneResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsOneResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt + */ + public AccountingSalesReceiptsOneResponse withGetSalesReceiptResponse(GetSalesReceiptResponse getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = Optional.ofNullable(getSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt + */ + public AccountingSalesReceiptsOneResponse withGetSalesReceiptResponse(Optional getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = getSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsOneResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsOneResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsOneResponse other = (AccountingSalesReceiptsOneResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSalesReceiptResponse, other.getSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsOneResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSalesReceiptResponse", getSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional getSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt + */ + public Builder getSalesReceiptResponse(GetSalesReceiptResponse getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = Optional.ofNullable(getSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt + */ + public Builder getSalesReceiptResponse(Optional getSalesReceiptResponse) { + Utils.checkNotNull(getSalesReceiptResponse, "getSalesReceiptResponse"); + this.getSalesReceiptResponse = getSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsOneResponse build() { + + return new AccountingSalesReceiptsOneResponse( + contentType, statusCode, rawResponse, + getSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateRequestBuilder.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateRequestBuilder.java new file mode 100644 index 000000000..0f295edae --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateRequest; +import com.apideck.unify.operations.AccountingSalesReceiptsUpdate; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +public class AccountingSalesReceiptsUpdateRequestBuilder { + + private AccountingSalesReceiptsUpdateRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public AccountingSalesReceiptsUpdateRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public AccountingSalesReceiptsUpdateRequestBuilder request(AccountingSalesReceiptsUpdateRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public AccountingSalesReceiptsUpdateRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public AccountingSalesReceiptsUpdateRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public CompletableFuture call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + AsyncRequestOperation operation + = new AccountingSalesReceiptsUpdate.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateResponse.java b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateResponse.java new file mode 100644 index 000000000..ab0c0eb17 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/operations/async/AccountingSalesReceiptsUpdateResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.operations.async; + +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.components.UpdateSalesReceiptResponse; +import com.apideck.unify.utils.AsyncResponse; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +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 AccountingSalesReceiptsUpdateResponse 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; + + /** + * SalesReceipt updated + */ + private Optional updateSalesReceiptResponse; + + /** + * Unexpected error + */ + private Optional unexpectedErrorResponse; + + @JsonCreator + public AccountingSalesReceiptsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional updateSalesReceiptResponse, + Optional unexpectedErrorResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.updateSalesReceiptResponse = updateSalesReceiptResponse; + this.unexpectedErrorResponse = unexpectedErrorResponse; + } + + public AccountingSalesReceiptsUpdateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty(), 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; + } + + /** + * SalesReceipt updated + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional updateSalesReceiptResponse() { + return (Optional) updateSalesReceiptResponse; + } + + /** + * Unexpected error + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unexpectedErrorResponse() { + return (Optional) unexpectedErrorResponse; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public AccountingSalesReceiptsUpdateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public AccountingSalesReceiptsUpdateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public AccountingSalesReceiptsUpdateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * SalesReceipt updated + */ + public AccountingSalesReceiptsUpdateResponse withUpdateSalesReceiptResponse(UpdateSalesReceiptResponse updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = Optional.ofNullable(updateSalesReceiptResponse); + return this; + } + + + /** + * SalesReceipt updated + */ + public AccountingSalesReceiptsUpdateResponse withUpdateSalesReceiptResponse(Optional updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = updateSalesReceiptResponse; + return this; + } + + /** + * Unexpected error + */ + public AccountingSalesReceiptsUpdateResponse withUnexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + + /** + * Unexpected error + */ + public AccountingSalesReceiptsUpdateResponse withUnexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountingSalesReceiptsUpdateResponse other = (AccountingSalesReceiptsUpdateResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.updateSalesReceiptResponse, other.updateSalesReceiptResponse) && + Utils.enhancedDeepEquals(this.unexpectedErrorResponse, other.unexpectedErrorResponse); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + updateSalesReceiptResponse, unexpectedErrorResponse); + } + + @Override + public String toString() { + return Utils.toString(AccountingSalesReceiptsUpdateResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "updateSalesReceiptResponse", updateSalesReceiptResponse, + "unexpectedErrorResponse", unexpectedErrorResponse); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional updateSalesReceiptResponse = Optional.empty(); + + private Optional unexpectedErrorResponse = 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; + } + + + /** + * SalesReceipt updated + */ + public Builder updateSalesReceiptResponse(UpdateSalesReceiptResponse updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = Optional.ofNullable(updateSalesReceiptResponse); + return this; + } + + /** + * SalesReceipt updated + */ + public Builder updateSalesReceiptResponse(Optional updateSalesReceiptResponse) { + Utils.checkNotNull(updateSalesReceiptResponse, "updateSalesReceiptResponse"); + this.updateSalesReceiptResponse = updateSalesReceiptResponse; + return this; + } + + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(UnexpectedErrorResponse unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = Optional.ofNullable(unexpectedErrorResponse); + return this; + } + + /** + * Unexpected error + */ + public Builder unexpectedErrorResponse(Optional unexpectedErrorResponse) { + Utils.checkNotNull(unexpectedErrorResponse, "unexpectedErrorResponse"); + this.unexpectedErrorResponse = unexpectedErrorResponse; + return this; + } + + public AccountingSalesReceiptsUpdateResponse build() { + + return new AccountingSalesReceiptsUpdateResponse( + contentType, statusCode, rawResponse, + updateSalesReceiptResponse, unexpectedErrorResponse); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesDownloadResponse.java b/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesDownloadResponse.java index 635c8a95f..e0f982a9e 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesDownloadResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesDownloadResponse.java @@ -34,7 +34,9 @@ public class FileStorageFilesDownloadResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ private Optional getFileDownloadResponse; @@ -95,7 +97,9 @@ public HttpResponse rawResponse() { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -145,7 +149,9 @@ public FileStorageFilesDownloadResponse withRawResponse(HttpResponse rawRe } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public FileStorageFilesDownloadResponse withGetFileDownloadResponse(Blob getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -155,7 +161,9 @@ public FileStorageFilesDownloadResponse withGetFileDownloadResponse(Blob getFile /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public FileStorageFilesDownloadResponse withGetFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -265,7 +273,9 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(Blob getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -274,7 +284,9 @@ public Builder getFileDownloadResponse(Blob getFileDownloadResponse) { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesExportResponse.java b/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesExportResponse.java index 85c6ebb30..990c7ce3d 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesExportResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/FileStorageFilesExportResponse.java @@ -34,7 +34,9 @@ public class FileStorageFilesExportResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ private Optional getFileDownloadResponse; @@ -95,7 +97,9 @@ public HttpResponse rawResponse() { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -145,7 +149,9 @@ public FileStorageFilesExportResponse withRawResponse(HttpResponse rawResp } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public FileStorageFilesExportResponse withGetFileDownloadResponse(Blob getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -155,7 +161,9 @@ public FileStorageFilesExportResponse withGetFileDownloadResponse(Blob getFileDo /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public FileStorageFilesExportResponse withGetFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -265,7 +273,9 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(Blob getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); @@ -274,7 +284,9 @@ public Builder getFileDownloadResponse(Blob getFileDownloadResponse) { } /** - * File Download + * File Download. When the request includes `x-apideck-follow-redirects: false` and the download would + * otherwise redirect to a presigned URL, the response body is instead an `application/json` object `{ + * url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the file. */ public Builder getFileDownloadResponse(Optional getFileDownloadResponse) { Utils.checkNotNull(getFileDownloadResponse, "getFileDownloadResponse"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/ProxyDeleteProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/async/ProxyDeleteProxyResponse.java index 987a3ba5f..b85d65f5f 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/ProxyDeleteProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/ProxyDeleteProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyDeleteProxyResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyDeleteProxyResponse withRawResponse(HttpResponse rawResponse) } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyDeleteProxyResponse withResponseJson(Map responseJso /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyDeleteProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyDeleteProxyResponse withResponseBinary(Optional resp } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyDeleteProxyResponse withResponsePdf(Blob responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyDeleteProxyResponse withResponsePdf(Optional respons } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyDeleteProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyDeleteProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyDeleteProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyDeleteProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyDeleteProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyDeleteProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Blob responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(Blob responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(Blob responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/ProxyGetProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/async/ProxyGetProxyResponse.java index 39c66e305..dda99bffe 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/ProxyGetProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/ProxyGetProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyGetProxyResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyGetProxyResponse withRawResponse(HttpResponse rawResponse) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyGetProxyResponse withResponseJson(Map responseJson) /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyGetProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyGetProxyResponse withResponseBinary(Optional respons } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyGetProxyResponse withResponsePdf(Blob responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyGetProxyResponse withResponsePdf(Optional responsePd } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyGetProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyGetProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyGetProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyGetProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyGetProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyGetProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Blob responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(Blob responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(Blob responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/ProxyOptionsProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/async/ProxyOptionsProxyResponse.java index 329af92c6..66b3634fd 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/ProxyOptionsProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/ProxyOptionsProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyOptionsProxyResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyOptionsProxyResponse withRawResponse(HttpResponse rawResponse) } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyOptionsProxyResponse withResponseJson(Map responseJs /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyOptionsProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyOptionsProxyResponse withResponseBinary(Optional res } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyOptionsProxyResponse withResponsePdf(Blob responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyOptionsProxyResponse withResponsePdf(Optional respon } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyOptionsProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyOptionsProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyOptionsProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyOptionsProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyOptionsProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyOptionsProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Blob responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(Blob responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(Blob responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/ProxyPatchProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/async/ProxyPatchProxyResponse.java index e35f757a8..92bc161ef 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/ProxyPatchProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/ProxyPatchProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyPatchProxyResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyPatchProxyResponse withRawResponse(HttpResponse rawResponse) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyPatchProxyResponse withResponseJson(Map responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyPatchProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyPatchProxyResponse withResponseBinary(Optional respo } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyPatchProxyResponse withResponsePdf(Blob responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyPatchProxyResponse withResponsePdf(Optional response } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyPatchProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyPatchProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyPatchProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyPatchProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyPatchProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPatchProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Blob responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(Blob responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(Blob responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/ProxyPostProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/async/ProxyPostProxyResponse.java index 50253a645..d52a55230 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/ProxyPostProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/ProxyPostProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyPostProxyResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyPostProxyResponse withRawResponse(HttpResponse rawResponse) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyPostProxyResponse withResponseJson(Map responseJson) /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyPostProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyPostProxyResponse withResponseBinary(Optional respon } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyPostProxyResponse withResponsePdf(Blob responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyPostProxyResponse withResponsePdf(Optional responseP } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyPostProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyPostProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyPostProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyPostProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyPostProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPostProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Blob responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(Blob responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(Blob responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/models/operations/async/ProxyPutProxyResponse.java b/src/main/java/com/apideck/unify/models/operations/async/ProxyPutProxyResponse.java index 5f75d0fb1..4dc7a2a5a 100644 --- a/src/main/java/com/apideck/unify/models/operations/async/ProxyPutProxyResponse.java +++ b/src/main/java/com/apideck/unify/models/operations/async/ProxyPutProxyResponse.java @@ -36,32 +36,50 @@ public class ProxyPutProxyResponse implements AsyncResponse { private HttpResponse rawResponse; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional> responseJson; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseBinary; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responsePdf; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseXml; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseCsv; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ private Optional responseText; @@ -172,7 +190,10 @@ public HttpResponse rawResponse() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -181,7 +202,10 @@ public Optional> responseJson() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -190,7 +214,10 @@ public Optional responseBinary() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @SuppressWarnings("unchecked") @JsonIgnore @@ -199,7 +226,10 @@ public Optional responsePdf() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseXml() { @@ -207,7 +237,10 @@ public Optional responseXml() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseCsv() { @@ -215,7 +248,10 @@ public Optional responseCsv() { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ @JsonIgnore public Optional responseText() { @@ -293,7 +329,10 @@ public ProxyPutProxyResponse withRawResponse(HttpResponse rawResponse) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -303,7 +342,10 @@ public ProxyPutProxyResponse withResponseJson(Map responseJson) /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -312,7 +354,10 @@ public ProxyPutProxyResponse withResponseJson(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -331,7 +379,10 @@ public ProxyPutProxyResponse withResponseBinary(Optional respons } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -341,7 +392,10 @@ public ProxyPutProxyResponse withResponsePdf(Blob responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -350,7 +404,10 @@ public ProxyPutProxyResponse withResponsePdf(Optional responsePd } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -360,7 +417,10 @@ public ProxyPutProxyResponse withResponseXml(String responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -369,7 +429,10 @@ public ProxyPutProxyResponse withResponseXml(Optional responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -379,7 +442,10 @@ public ProxyPutProxyResponse withResponseCsv(String responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -388,7 +454,10 @@ public ProxyPutProxyResponse withResponseCsv(Optional responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -398,7 +467,10 @@ public ProxyPutProxyResponse withResponseText(String responseText) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public ProxyPutProxyResponse withResponseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -610,7 +682,10 @@ public Builder rawResponse(HttpResponse rawResponse) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Map responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -619,7 +694,10 @@ public Builder responseJson(Map responseJson) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseJson(Optional> responseJson) { Utils.checkNotNull(responseJson, "responseJson"); @@ -629,7 +707,10 @@ public Builder responseJson(Optional> responseJson /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Blob responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -638,7 +719,10 @@ public Builder responseBinary(Blob responseBinary) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseBinary(Optional responseBinary) { Utils.checkNotNull(responseBinary, "responseBinary"); @@ -648,7 +732,10 @@ public Builder responseBinary(Optional responseBinary) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Blob responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -657,7 +744,10 @@ public Builder responsePdf(Blob responsePdf) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responsePdf(Optional responsePdf) { Utils.checkNotNull(responsePdf, "responsePdf"); @@ -667,7 +757,10 @@ public Builder responsePdf(Optional responsePdf) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(String responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -676,7 +769,10 @@ public Builder responseXml(String responseXml) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseXml(Optional responseXml) { Utils.checkNotNull(responseXml, "responseXml"); @@ -686,7 +782,10 @@ public Builder responseXml(Optional responseXml) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(String responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -695,7 +794,10 @@ public Builder responseCsv(String responseCsv) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseCsv(Optional responseCsv) { Utils.checkNotNull(responseCsv, "responseCsv"); @@ -705,7 +807,10 @@ public Builder responseCsv(Optional responseCsv) { /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(String responseText) { Utils.checkNotNull(responseText, "responseText"); @@ -714,7 +819,10 @@ public Builder responseText(String responseText) { } /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would + * otherwise redirect to a presigned URL (oversized responses), the body is instead an + * `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization + * header) to retrieve the payload. */ public Builder responseText(Optional responseText) { Utils.checkNotNull(responseText, "responseText"); diff --git a/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAdd.java b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAdd.java new file mode 100644 index 000000000..1a7b14872 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAdd.java @@ -0,0 +1,418 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.CreatePaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAddResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.SerializedBody; +import com.apideck.unify.utils.Utils.JsonShape; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +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.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingPaymentMethodsAdd { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsAdd", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsAdd", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsAdd", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/accounting/payment-methods"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "accountingPaymentMethod", + "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.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingPaymentMethodsAddRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsAddRequest.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(AccountingPaymentMethodsAddRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingPaymentMethodsAddResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingPaymentMethodsAddResponse.Builder resBuilder = + AccountingPaymentMethodsAddResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingPaymentMethodsAddResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withCreatePaymentMethodResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingPaymentMethodsAddRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsAddRequest.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(AccountingPaymentMethodsAddRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingPaymentMethodsAddResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingPaymentMethodsAddResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingPaymentMethodsAddResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withCreatePaymentMethodResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAll.java b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAll.java new file mode 100644 index 000000000..573349b1e --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsAll.java @@ -0,0 +1,401 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.GetPaymentMethodsResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsAllResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingPaymentMethodsAll { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsAll", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsAll", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsAll", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/accounting/payment-methods"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingPaymentMethodsAllRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsAllRequest.class); + 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(AccountingPaymentMethodsAllRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingPaymentMethodsAllResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingPaymentMethodsAllResponse.Builder resBuilder = + AccountingPaymentMethodsAllResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingPaymentMethodsAllResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetPaymentMethodsResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingPaymentMethodsAllRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsAllRequest.class); + 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(AccountingPaymentMethodsAllRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingPaymentMethodsAllResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingPaymentMethodsAllResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingPaymentMethodsAllResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGetPaymentMethodsResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsDelete.java b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsDelete.java new file mode 100644 index 000000000..59f2f07c2 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsDelete.java @@ -0,0 +1,403 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.DeletePaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsDeleteResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingPaymentMethodsDelete { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsDelete", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsDelete", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsDelete", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/accounting/payment-methods/{id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingPaymentMethodsDeleteRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsDeleteRequest.class); + 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(AccountingPaymentMethodsDeleteRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingPaymentMethodsDeleteResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingPaymentMethodsDeleteResponse.Builder resBuilder = + AccountingPaymentMethodsDeleteResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingPaymentMethodsDeleteResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withDeletePaymentMethodResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingPaymentMethodsDeleteRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsDeleteRequest.class); + 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(AccountingPaymentMethodsDeleteRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingPaymentMethodsDeleteResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingPaymentMethodsDeleteResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingPaymentMethodsDeleteResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withDeletePaymentMethodResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsOne.java b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsOne.java new file mode 100644 index 000000000..36b602369 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsOne.java @@ -0,0 +1,403 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.GetPaymentMethodResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsOneResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingPaymentMethodsOne { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsOne", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsOne", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsOne", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/accounting/payment-methods/{id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingPaymentMethodsOneRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsOneRequest.class); + 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(AccountingPaymentMethodsOneRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingPaymentMethodsOneResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingPaymentMethodsOneResponse.Builder resBuilder = + AccountingPaymentMethodsOneResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingPaymentMethodsOneResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetPaymentMethodResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingPaymentMethodsOneRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsOneRequest.class); + 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(AccountingPaymentMethodsOneRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingPaymentMethodsOneResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingPaymentMethodsOneResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingPaymentMethodsOneResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGetPaymentMethodResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsUpdate.java new file mode 100644 index 000000000..666d6a92a --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingPaymentMethodsUpdate.java @@ -0,0 +1,420 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.components.UpdatePaymentMethodResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateRequest; +import com.apideck.unify.models.operations.AccountingPaymentMethodsUpdateResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.SerializedBody; +import com.apideck.unify.utils.Utils.JsonShape; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +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.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingPaymentMethodsUpdate { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsUpdate", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsUpdate", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.paymentMethodsUpdate", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/accounting/payment-methods/{id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "accountingPaymentMethod", + "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.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingPaymentMethodsUpdateRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsUpdateRequest.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(AccountingPaymentMethodsUpdateRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingPaymentMethodsUpdateResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingPaymentMethodsUpdateResponse.Builder resBuilder = + AccountingPaymentMethodsUpdateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingPaymentMethodsUpdateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUpdatePaymentMethodResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingPaymentMethodsUpdateRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingPaymentMethodsUpdateRequest.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(AccountingPaymentMethodsUpdateRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingPaymentMethodsUpdateResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingPaymentMethodsUpdateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingPaymentMethodsUpdateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUpdatePaymentMethodResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAdd.java b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAdd.java new file mode 100644 index 000000000..2d20be953 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAdd.java @@ -0,0 +1,418 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.CreateSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAddResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.SerializedBody; +import com.apideck.unify.utils.Utils.JsonShape; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +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.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingSalesReceiptsAdd { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsAdd", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsAdd", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsAdd", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/accounting/sales-receipts"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "salesReceipt", + "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.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingSalesReceiptsAddRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsAddRequest.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(AccountingSalesReceiptsAddRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingSalesReceiptsAddResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingSalesReceiptsAddResponse.Builder resBuilder = + AccountingSalesReceiptsAddResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingSalesReceiptsAddResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withCreateSalesReceiptResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingSalesReceiptsAddRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsAddRequest.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(AccountingSalesReceiptsAddRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingSalesReceiptsAddResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingSalesReceiptsAddResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingSalesReceiptsAddResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withCreateSalesReceiptResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAll.java b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAll.java new file mode 100644 index 000000000..5000de6cc --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsAll.java @@ -0,0 +1,401 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.GetSalesReceiptsResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsAllResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingSalesReceiptsAll { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsAll", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsAll", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsAll", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/accounting/sales-receipts"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingSalesReceiptsAllRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsAllRequest.class); + 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(AccountingSalesReceiptsAllRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingSalesReceiptsAllResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingSalesReceiptsAllResponse.Builder resBuilder = + AccountingSalesReceiptsAllResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingSalesReceiptsAllResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetSalesReceiptsResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingSalesReceiptsAllRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsAllRequest.class); + 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(AccountingSalesReceiptsAllRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingSalesReceiptsAllResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingSalesReceiptsAllResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingSalesReceiptsAllResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGetSalesReceiptsResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsDelete.java b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsDelete.java new file mode 100644 index 000000000..5c9c73232 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsDelete.java @@ -0,0 +1,403 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.DeleteSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsDeleteResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingSalesReceiptsDelete { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsDelete", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsDelete", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsDelete", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/accounting/sales-receipts/{id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingSalesReceiptsDeleteRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsDeleteRequest.class); + 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(AccountingSalesReceiptsDeleteRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingSalesReceiptsDeleteResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingSalesReceiptsDeleteResponse.Builder resBuilder = + AccountingSalesReceiptsDeleteResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingSalesReceiptsDeleteResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withDeleteSalesReceiptResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingSalesReceiptsDeleteRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsDeleteRequest.class); + 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(AccountingSalesReceiptsDeleteRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingSalesReceiptsDeleteResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingSalesReceiptsDeleteResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingSalesReceiptsDeleteResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withDeleteSalesReceiptResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsOne.java b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsOne.java new file mode 100644 index 000000000..74ad08e39 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsOne.java @@ -0,0 +1,403 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.GetSalesReceiptResponse; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsOneResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingSalesReceiptsOne { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsOne", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsOne", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsOne", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/accounting/sales-receipts/{id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingSalesReceiptsOneRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsOneRequest.class); + 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(AccountingSalesReceiptsOneRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingSalesReceiptsOneResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingSalesReceiptsOneResponse.Builder resBuilder = + AccountingSalesReceiptsOneResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingSalesReceiptsOneResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetSalesReceiptResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingSalesReceiptsOneRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsOneRequest.class); + 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(AccountingSalesReceiptsOneRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingSalesReceiptsOneResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingSalesReceiptsOneResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingSalesReceiptsOneResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGetSalesReceiptResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java new file mode 100644 index 000000000..786632897 --- /dev/null +++ b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java @@ -0,0 +1,420 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.operations; + +import static com.apideck.unify.operations.Operations.RequestOperation; +import static com.apideck.unify.utils.Exceptions.unchecked; +import static com.apideck.unify.operations.Operations.AsyncRequestOperation; + +import com.apideck.unify.SDKConfiguration; +import com.apideck.unify.SecuritySource; +import com.apideck.unify.models.components.UnexpectedErrorResponse; +import com.apideck.unify.models.components.UpdateSalesReceiptResponse; +import com.apideck.unify.models.errors.APIException; +import com.apideck.unify.models.errors.BadRequestResponse; +import com.apideck.unify.models.errors.NotFoundResponse; +import com.apideck.unify.models.errors.PaymentRequiredResponse; +import com.apideck.unify.models.errors.UnauthorizedResponse; +import com.apideck.unify.models.errors.UnprocessableResponse; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateRequest; +import com.apideck.unify.models.operations.AccountingSalesReceiptsUpdateResponse; +import com.apideck.unify.utils.AsyncRetries; +import com.apideck.unify.utils.BackoffStrategy; +import com.apideck.unify.utils.Blob; +import com.apideck.unify.utils.Globals; +import com.apideck.unify.utils.HTTPClient; +import com.apideck.unify.utils.HTTPRequest; +import com.apideck.unify.utils.Headers; +import com.apideck.unify.utils.Hook.AfterErrorContextImpl; +import com.apideck.unify.utils.Hook.AfterSuccessContextImpl; +import com.apideck.unify.utils.Hook.BeforeRequestContextImpl; +import com.apideck.unify.utils.NonRetryableException; +import com.apideck.unify.utils.Options; +import com.apideck.unify.utils.Retries; +import com.apideck.unify.utils.RetryConfig; +import com.apideck.unify.utils.SerializedBody; +import com.apideck.unify.utils.Utils.JsonShape; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +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.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class AccountingSalesReceiptsUpdate { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + final Globals operationGlobals; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "500", "502", "503", "504"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(900000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + this.operationGlobals = new Globals(); + this.sdkConfiguration.globals.getParam("header", "x-apideck-consumer-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-consumer-id", param)); + this.sdkConfiguration.globals.getParam("header", "x-apideck-app-id") + .ifPresent(param -> operationGlobals.putParam("header", "x-apideck-app-id", param)); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsUpdate", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsUpdate", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "accounting.salesReceiptsUpdate", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/accounting/sales-receipts/{id}", + request, this.operationGlobals); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "salesReceipt", + "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.addQueryParams(Utils.getQueryParams( + klass, + request, + this.operationGlobals)); + 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, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(AccountingSalesReceiptsUpdateRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsUpdateRequest.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(AccountingSalesReceiptsUpdateRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public AccountingSalesReceiptsUpdateResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + AccountingSalesReceiptsUpdateResponse.Builder resBuilder = + AccountingSalesReceiptsUpdateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + AccountingSalesReceiptsUpdateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUpdateSalesReceiptResponse(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 BadRequestResponse.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 UnauthorizedResponse.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withUnexpectedErrorResponse(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + SDKConfiguration sdkConfiguration, Optional options, + ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(AccountingSalesReceiptsUpdateRequest request) throws Exception { + HttpRequest req = buildRequest(request, AccountingSalesReceiptsUpdateRequest.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(AccountingSalesReceiptsUpdateRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> 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.apideck.unify.models.operations.async.AccountingSalesReceiptsUpdateResponse.Builder resBuilder = + com.apideck.unify.models.operations.async.AccountingSalesReceiptsUpdateResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + com.apideck.unify.models.operations.async.AccountingSalesReceiptsUpdateResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUpdateSalesReceiptResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return BadRequestResponse.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 UnauthorizedResponse.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return PaymentRequiredResponse.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 NotFoundResponse.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 UnprocessableResponse.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"); + } + if (Utils.statusCodeMatches(response.statusCode(), "default")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withUnexpectedErrorResponse); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +}