diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2e5c10aa..cf8988eb 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 0e1578f5-5df8-4086-96d6-369ac62fc49d management: - docChecksum: 8eb7746fd60545ccbdd89ac13589745a - docVersion: 10.32.0 - speakeasyVersion: 1.791.4 - generationVersion: 2.926.8 - releaseVersion: 0.22.0 - configChecksum: 0df0d6ac756e671dd26c91877a044bb7 + docChecksum: cf6da62ddff8d6cfa800e21e01fca839 + docVersion: 10.38.1 + speakeasyVersion: 1.793.2 + generationVersion: 2.928.0 + releaseVersion: 0.23.0 + configChecksum: c80a091fd78c695aeb80d55593066052 repoURL: https://github.com/apideck-libraries/sdk-php.git installationURL: https://github.com/apideck-libraries/sdk-php.git published: true persistentEdits: - generation_id: 21270f68-aaf7-43de-83ec-2eb62e653de5 - pristine_commit_hash: 35e2e2348d093598c3c1f87a43c2847babd3f598 - pristine_tree_hash: 2903410aa765cc29c4d643574f3c461d7a04e141 + generation_id: 7bc0ee9b-a2b6-42c5-bb47-b94220a11ac4 + pristine_commit_hash: c34e92498f72557ea094443e60c61663bf6137f7 + pristine_tree_hash: 6a790ae83e4f0788a0e55e457df9ac057bab9454 features: php: additionalProperties: 0.1.1 @@ -127,6 +127,22 @@ trackedFiles: id: 70fbdc103d2c last_write_checksum: sha1:db6e39a8a661935904b7d6869658601898ae9728 pristine_git_object: ad8fc040c2718c23bcc0d617b126bdd91db78974 + docs/Models/Components/AccountingPaymentMethod.md: + id: b8f4cf20017c + last_write_checksum: sha1:d56d12616e084b257bcbcb52cc3a6fb5367d7a32 + pristine_git_object: e10fd56e071067d5af204f6d1a30809e84f2d59d + docs/Models/Components/AccountingPaymentMethodInput.md: + id: 07535785ed1d + last_write_checksum: sha1:8dc60b3995afd522ae1ef5f11da2f61dfd5d4031 + pristine_git_object: 3a7d81d2f99a5357b67e322cc839544a18ba6277 + docs/Models/Components/AccountingPaymentMethodStatus.md: + id: ce0c7ae2aebb + last_write_checksum: sha1:55e4f14373ef1c90b4e4e5dec88a598e2cb24f3d + pristine_git_object: a55ea78ef26385c31a81e89e68d0784356f09685 + docs/Models/Components/AccountingPaymentMethodType.md: + id: f11c64420e92 + last_write_checksum: sha1:f545e848d10a36ce7da32ccd79a424cfa50a7693 + pristine_git_object: 727a5c899361290652d0e5e886d528b71ecf9d24 docs/Models/Components/AccountingPeriod.md: id: c92f456e524e last_write_checksum: sha1:85d23a088bfb0fe445526b57b6c11f32542a42ec @@ -281,8 +297,8 @@ trackedFiles: pristine_git_object: 8f351cff9926be945057bec19764f89bb5fe8093 docs/Models/Components/Attachment.md: id: df237b715365 - last_write_checksum: sha1:010090767baa918d59c383f57993efae8f67bb52 - pristine_git_object: af608745c18b08e979552a2f995cc014db2761df + last_write_checksum: sha1:c802b9373712b1870162bd68e7a53898da953190 + pristine_git_object: 883cfb2d35d4463accab235a76a0ba1f58fb61a4 docs/Models/Components/AttachmentReference.md: id: 397df4695816 last_write_checksum: sha1:91ba743d69b00f1a87bdf84e6fd832eb5b99d285 @@ -393,12 +409,12 @@ trackedFiles: pristine_git_object: 4c1aa744fa21f05e098d89c867247b4bad915d3c docs/Models/Components/BankFeedAccount.md: id: f3d5f0f0eb24 - last_write_checksum: sha1:a9553fa69b928eadd0ce36a13bc4f3cb2b7eb5a3 - pristine_git_object: 4a21fdff5501ab1e021b5463fd6d373350401a72 + last_write_checksum: sha1:9eaf33599edf73f7172f84756aa06d7b1041624a + pristine_git_object: b6024e1b9990684b2eab776c65d8f291218f0a77 docs/Models/Components/BankFeedAccountInput.md: id: 0f7c6a437662 - last_write_checksum: sha1:a43b258c60d3080fd33850fa9bce2e7cc33d53b2 - pristine_git_object: eba10c1d8f7a8df767065faebecdf137f5ce66f2 + last_write_checksum: sha1:9e875c37cad4e94582686e4a7c2545728f6d680f + pristine_git_object: 25c4eb4b79dda6f5d877d49116af24e165077770 docs/Models/Components/BankFeedStatement.md: id: ca8f7001cd23 last_write_checksum: sha1:518d68e629cbd729b7d6a6da4a320154b1f4df08 @@ -943,6 +959,10 @@ trackedFiles: id: 4980b464dd57 last_write_checksum: sha1:4f260357862efe1c3bdc35b83082ff78889482f4 pristine_git_object: 5c164f7e467db0b9bdd07c49fb0e5ca6de98aca7 + docs/Models/Components/CreatePaymentMethodResponse.md: + id: d18399f8e508 + last_write_checksum: sha1:dcd9dff0307f1fe8bd65a6648bb46a4c81f6baf4 + pristine_git_object: 838c0ef0331c2cafbf54756f8de35c52740f119c docs/Models/Components/CreatePaymentResponse.md: id: 7d149e6cdf6b last_write_checksum: sha1:738aa7a8ebf437bcf5e55d226cc58fd90367ebb5 @@ -967,6 +987,10 @@ trackedFiles: id: d7476ec994d7 last_write_checksum: sha1:9d1b8419cdd89a384842f30e703fedb34684a0ad pristine_git_object: 3f2bf0c1e9110cfaadfa5b099e7a14678b1c7720 + docs/Models/Components/CreateSalesReceiptResponse.md: + id: c3df7f424a38 + last_write_checksum: sha1:08417578e8d0d9a02078875f56d55cee83d250bc + pristine_git_object: 0dfd43ebe7f0e48d6853ce1e15deab4ac3d2b5b5 docs/Models/Components/CreateSessionResponse.md: id: dd3275e51702 last_write_checksum: sha1:9ef12531ef1e486ba6ab137f57fc774a4e21b938 @@ -1073,16 +1097,16 @@ trackedFiles: pristine_git_object: 258960b9d5f769959884c7e6a6d07cc6f97758bd docs/Models/Components/CustomField1.md: id: 9abd282a9443 - last_write_checksum: sha1:d6dc558546e4a27901561d7493a316244a7e4347 - pristine_git_object: 9ff7b64f0ddc57ca1ad6ebffb02bd6c7bb41277a + last_write_checksum: sha1:ee87991c1c07a42b276a7d9ad708bfe84b71657a + pristine_git_object: 8a2f5e987e40071e0f109fbba43fa0a3e44fe49d docs/Models/Components/CustomField1Value.md: id: 5a96707739a6 last_write_checksum: sha1:dab7b5077fd55663d82f35ed2ce34cdadc55cec0 pristine_git_object: d999e37d6f22b69cf17c73f4e4e8fc8a879cb301 docs/Models/Components/CustomField2.md: id: b456d61d15fb - last_write_checksum: sha1:8d83d8ee363d5182b15ffa1015af249afe2eec01 - pristine_git_object: d2521284b0f59da72bfe92225a2034105dd57a56 + last_write_checksum: sha1:2248fc82d1196881f6cd4778641b4750c0e63c05 + pristine_git_object: d340cd5fd0cc6abdd35e046f1964c193fa408ec1 docs/Models/Components/CustomFieldFinder.md: id: a246bd695823 last_write_checksum: sha1:13ff2359eb55a22cc87e76f2751cbccf94eed423 @@ -1355,6 +1379,10 @@ trackedFiles: id: 9e1551dd6fd6 last_write_checksum: sha1:446d1ab9fd7f0742443d31fefa3aeda564155d3c pristine_git_object: d8d09aa95c66cfcbee6452b433a7129d7c44a431 + docs/Models/Components/DeletePaymentMethodResponse.md: + id: d98827e2178b + last_write_checksum: sha1:4bc6c962356d7be16fa59e5247e7b2a0cfd669f8 + pristine_git_object: b4cf20f4b07bd8a0aef04d7d92e12682cab99d20 docs/Models/Components/DeletePaymentResponse.md: id: 85465fccaae4 last_write_checksum: sha1:280fbf053544a008fe1d731390928965e8cb8839 @@ -1379,6 +1407,10 @@ trackedFiles: id: e29378fae3df last_write_checksum: sha1:1d8aa1b3132bf679de7c8c53b182c89174f3d10a pristine_git_object: 686dc218f035bd2fd4088e7e32793ea23ce74f6d + docs/Models/Components/DeleteSalesReceiptResponse.md: + id: 9a915fae598d + last_write_checksum: sha1:80601c7ccde613ca53dc92fb59eb978e8441e0af + pristine_git_object: 38bb6420d1643841d2ac4c662dad4acc3bd8efc3 docs/Models/Components/DeleteSharedLinkResponse.md: id: 284885e8d0cc last_write_checksum: sha1:b4e34d73c8de804012c56e02f26f9cc156d81732 @@ -2319,6 +2351,14 @@ trackedFiles: id: 326c4f861702 last_write_checksum: sha1:50533da322a3ad0c71eb970e0d2e19e5ce7bf6e5 pristine_git_object: 04e85b8c836c15cdee7a31a2fa7912cd10238aa0 + docs/Models/Components/GetPaymentMethodResponse.md: + id: 86feab185188 + last_write_checksum: sha1:afc894f9bcc02ddc5544bdf917c87479f7f1c096 + pristine_git_object: 9fc6d6dd586161bf62b9fe97d1936915719b4dcb + docs/Models/Components/GetPaymentMethodsResponse.md: + id: 8147aa8d0952 + last_write_checksum: sha1:5a22197b71d7dcbb10a4fed076508922ff73a9b2 + pristine_git_object: 28f197f47ab46ff6e7bb26492735f74aca07ea6f docs/Models/Components/GetPaymentResponse.md: id: 127b691885d4 last_write_checksum: sha1:68427b817f3051e20e3b325e1763dc03e2d3b383 @@ -2387,6 +2427,14 @@ trackedFiles: id: fd8e75031a44 last_write_checksum: sha1:c355e220016423cae74a55a74695dc8c4f353f23 pristine_git_object: 947bbd5c57d979b65b43124d9e34a43f49c0647f + docs/Models/Components/GetSalesReceiptResponse.md: + id: e66dedfa2c08 + last_write_checksum: sha1:d78a7d3d3bb4d3b847840268dfeb02a223f9c0e2 + pristine_git_object: dd113dba054af1ce9986f4feccb44ead11cdac76 + docs/Models/Components/GetSalesReceiptsResponse.md: + id: f1a062ae57b0 + last_write_checksum: sha1:61ab6b18498e108658be2f859fc1e3a8abe6bc1c + pristine_git_object: 2929c9824d4932cf0fa9109ee59b3ab2e14be3b5 docs/Models/Components/GetSharedLinkResponse.md: id: 84a3a45c25a6 last_write_checksum: sha1:eebedf2da9b5657715ab5387dc6d59da75183549 @@ -3293,20 +3341,20 @@ trackedFiles: pristine_git_object: 021edfdff4fe68a4c73c86b5998a1befcd4a77dc docs/Models/Components/Refund.md: id: b2046ea00fdd - last_write_checksum: sha1:d38f9eab1896a1a05fe64fdcd671fcafb3a6a62e - pristine_git_object: fb57bed2e99ce744c989d0bef15c8ee1e85fea9d + last_write_checksum: sha1:de85b815ca9007ed209fdb59e8534f293b6b3ffe + pristine_git_object: e0ac08a9d94bb00238db7099f17eb2570f6331cb docs/Models/Components/RefundInput.md: id: c621a2a648b9 - last_write_checksum: sha1:a4f246e28d9e2144d9ad4a3f0b5b518c5646cf86 - pristine_git_object: 1f3dc8709c843f1ba92da64ab77138b537153198 + last_write_checksum: sha1:3cec111e79809094a9ad73f3651ab96661f1fc0d + pristine_git_object: 9b678b0d50472f0ce426545eec170c072707e552 docs/Models/Components/RefundStatus.md: id: 71e703ebbb2a last_write_checksum: sha1:6bc7011b3cf02f81fe028878e0fe3342196bede8 pristine_git_object: c05c66a7507e270ea8c40fb4d581d4dfc044b61d docs/Models/Components/RefundType.md: id: 4582dbfd1666 - last_write_checksum: sha1:18528b6d3a9b81d0ad66a2655a6411ae01d8e7fc - pristine_git_object: 602404ebbff10f77f20c4893c90761555ffeb0d4 + last_write_checksum: sha1:2d064164d7c2b6b587200ca27c1309d70b287ea0 + pristine_git_object: b8dd8a5f87300fc1aaf488e83a8410288981971a docs/Models/Components/RefundsFilter.md: id: 32cac395b22e last_write_checksum: sha1:a6ff0327154fa565fe0acf895825e37af09d6e67 @@ -3355,6 +3403,26 @@ trackedFiles: id: ea00d3973baf last_write_checksum: sha1:191d5e0c49a192de459864c37fbbf5fff8011ee4 pristine_git_object: ec0cefa6b72ea89c12819fef37a6f6c33962d0e4 + docs/Models/Components/SalesReceipt.md: + id: 1ac67f44ca22 + last_write_checksum: sha1:e6eac3bf3519868333463c95da2680e9b86e376c + pristine_git_object: 0012c41ee9062f23e01f65ec3971975dc895171c + docs/Models/Components/SalesReceiptInput.md: + id: 06dcef797b5d + last_write_checksum: sha1:ff3ed2f7710860a7c23d039ba366dcafd968b51f + pristine_git_object: 20800c2899023016d34a2e5e70ae86f3c7e809f0 + docs/Models/Components/SalesReceiptsFilter.md: + id: 106988be984c + last_write_checksum: sha1:871c3b98b29111c99aa873b6f187a9ed54a01771 + pristine_git_object: cbee4e1a7aa8e199a6255e966c068c1a937036a2 + docs/Models/Components/SalesReceiptsSort.md: + id: d8aadfba3499 + last_write_checksum: sha1:dd5032e0e3af165009a79659ead0fe13ab451f20 + pristine_git_object: 006cad203fe8d6c6330e930581f0581341b11973 + docs/Models/Components/SalesReceiptsSortBy.md: + id: b34cabf8ecf2 + last_write_checksum: sha1:356fd6eac2e782752fc72f3702a968356f7338f7 + pristine_git_object: 2b0063c4fcfc1ba443ab72ec77a502aedcabde5f docs/Models/Components/Schedule.md: id: 5c919cc5e452 last_write_checksum: sha1:b0a2a9de5896b867bdcf00153e53b883e3d0e378 @@ -3629,8 +3697,8 @@ trackedFiles: pristine_git_object: c9c4b61d364112b7bf7a865f2fb18539794b76b4 docs/Models/Components/Transactions.md: id: ff1a93f80f7d - last_write_checksum: sha1:30d233bd26685407d2221a354eed627b7e3ad40b - pristine_git_object: 5616234951de324b044e284c083867514241f0e4 + last_write_checksum: sha1:94b8a510e977792f6e2f85a3fd0bfccb584bc135 + pristine_git_object: ff05423e48eece754e90235089e38cfc774fdf81 docs/Models/Components/Two.md: id: 24784dbdaa65 last_write_checksum: sha1:7eb88bfeb8ef59d696cc378e4f41766a2f3a2231 @@ -3855,6 +3923,10 @@ trackedFiles: id: fec1a2611e38 last_write_checksum: sha1:b24440d0d5ec75fe0895ca7bb2ba29e1f5962dc4 pristine_git_object: 2594bb66a4f5fe3f62671d3d6b1e1fb62418a623 + docs/Models/Components/UpdatePaymentMethodResponse.md: + id: feec1cdc726f + last_write_checksum: sha1:7e4b9b600ccb57669cb12aae3347057ebc02e3b4 + pristine_git_object: 31cb566a00fe3142afafc432ea8063f89c298c58 docs/Models/Components/UpdatePaymentResponse.md: id: 15c0be93bb08 last_write_checksum: sha1:a917000d16924f836887f38adfa717a6804f4cf9 @@ -3879,6 +3951,10 @@ trackedFiles: id: 4ebe421c92d2 last_write_checksum: sha1:5c2c56ab18dbf5c0488bd133a4ba80c3e33af947 pristine_git_object: 59395a93e5e0d229118263c294ef5b2f047cc11f + docs/Models/Components/UpdateSalesReceiptResponse.md: + id: 7a263df02e31 + last_write_checksum: sha1:10a5765546c9e2911ef1a40d699d551df07db718 + pristine_git_object: b471754128362f2fafe4cae388aa3946ac29939e docs/Models/Components/UpdateSharedLinkResponse.md: id: 4b8518762f0b last_write_checksum: sha1:3d577ac7d66a10fcfc97efbb12b9671b7036997f @@ -4145,12 +4221,12 @@ trackedFiles: pristine_git_object: 0e78263f21fe391be52bbb373f0dda1a2872ef99 docs/Models/Operations/AccountingAttachmentsDownloadRequest.md: id: 625df72b289e - last_write_checksum: sha1:112389beffc6491797d955ace4ef1d002d0c6974 - pristine_git_object: 05e0711add03834b43587c6dcd563a6cdae44174 + last_write_checksum: sha1:36e9cdc26ae1e9d72c719115cdbc20d332a5a8b2 + pristine_git_object: ce7d376feedea08d921d040fe614dade9d620c82 docs/Models/Operations/AccountingAttachmentsDownloadResponse.md: id: 7ee9e5e2cb71 - last_write_checksum: sha1:373afa3d7ae79489bfa25789c142d68ba7ffbb3f - pristine_git_object: f21b6b76ec4080c9a46b61d3a0a416be0f59f1bb + last_write_checksum: sha1:9d78a298fbbc9cee30dea3f668c109271c664fbb + pristine_git_object: 548ac5fc3b96a219f7050cf69ccabdd2e1c49bac docs/Models/Operations/AccountingAttachmentsOneRequest.md: id: 012804f518db last_write_checksum: sha1:6e5a74139ba8a3ff98a7a5f66d09f3f474dc7fa5 @@ -4903,6 +4979,46 @@ trackedFiles: id: fc77ee72d3a0 last_write_checksum: sha1:2265a5a076edd28617e09a7e1ab1aa225b2ebd01 pristine_git_object: 26ebcb6508231938f744afab8b68ccb339336f1d + docs/Models/Operations/AccountingPaymentMethodsAddRequest.md: + id: dc75746b0a81 + last_write_checksum: sha1:4ac0732492e9747b65ddcd907dd1777ab24993eb + pristine_git_object: 5d81e1c3bf9b263e5a291f14771d02ee6dea5652 + docs/Models/Operations/AccountingPaymentMethodsAddResponse.md: + id: 1fdc6fe3776e + last_write_checksum: sha1:0a8bdb538764134c7f48837656b7b2b3621f80e0 + pristine_git_object: c5336a2fa87bd8c42fd9b48536284ba2fde381c9 + docs/Models/Operations/AccountingPaymentMethodsAllRequest.md: + id: 8bed5ea1fafb + last_write_checksum: sha1:fa5bb97bb799d7e3e54e486e5bb96fcb0495d83d + pristine_git_object: 6a0e1b646a921d8903b73ad68e644a0a62bec90b + docs/Models/Operations/AccountingPaymentMethodsAllResponse.md: + id: 4895c46c03d9 + last_write_checksum: sha1:e31e00f8f47062cc57a8bf90e4d2b78ea43e8213 + pristine_git_object: e22327caa29ca71d6b3b248c52ef409e3585ba1a + docs/Models/Operations/AccountingPaymentMethodsDeleteRequest.md: + id: 1ce7e26ac4db + last_write_checksum: sha1:0ce267512e1cc496c371e49834d046c8c72d5cfe + pristine_git_object: 1229747662ed2d8ecd5ceef99f88f395cdb1560c + docs/Models/Operations/AccountingPaymentMethodsDeleteResponse.md: + id: 334a82b0bbbc + last_write_checksum: sha1:da5539482c21545117ca03f4bcb01b83912215b1 + pristine_git_object: 393b61d391f420ceebe1a8cc6207f4c3dbf8158f + docs/Models/Operations/AccountingPaymentMethodsOneRequest.md: + id: 51cf2aa6b247 + last_write_checksum: sha1:39426f54b776771284745199a6babf5f9c4daf59 + pristine_git_object: 3c213948b94a02f0ed5fe330be20d1c8ba7988e9 + docs/Models/Operations/AccountingPaymentMethodsOneResponse.md: + id: 5749e7578c5b + last_write_checksum: sha1:960a17490bc9359e421c1b972c25edecd95b8e93 + pristine_git_object: 9dbba62e8cdf5356eb4f26597b70f1c05be603db + docs/Models/Operations/AccountingPaymentMethodsUpdateRequest.md: + id: eff57b8ff104 + last_write_checksum: sha1:5b5620c082d6b79c53c753f990465ad54f2c5baf + pristine_git_object: a7c2b0056d9d19c9bc1e1ad94f0f569735a38ed2 + docs/Models/Operations/AccountingPaymentMethodsUpdateResponse.md: + id: 470813b7d5e3 + last_write_checksum: sha1:7896eba1b26b56ab2cf3d169e8bdc4ae276186d9 + pristine_git_object: 6d59c2704e31c4866bade737c1f204dd566e1dcf docs/Models/Operations/AccountingPaymentsAddRequest.md: id: fdca605d98a0 last_write_checksum: sha1:ccc57def75e2153a8e1ca12078499d0d9da05101 @@ -5111,6 +5227,46 @@ trackedFiles: id: a6ba2ccd4633 last_write_checksum: sha1:da6f04336b163c806668a36f6d8866fdcc580d38 pristine_git_object: 16af95ed75a8beaa060d542d1048afea1f884498 + docs/Models/Operations/AccountingSalesReceiptsAddRequest.md: + id: 75c44498613c + last_write_checksum: sha1:d71b4919cd319e222737a3f7d490a5c75cf42e4f + pristine_git_object: b6442839169feb93982fbca4b630caadc0a49e4d + docs/Models/Operations/AccountingSalesReceiptsAddResponse.md: + id: 5ff20e8bd2e6 + last_write_checksum: sha1:7e9367702c69e56a390a009068926bc280f3ea0f + pristine_git_object: 32186a864d662e1087def48e0d30f808a38f393f + docs/Models/Operations/AccountingSalesReceiptsAllRequest.md: + id: 069a58e835bc + last_write_checksum: sha1:9c26593aa527952a84dc9e1ff12f0a4146992f9e + pristine_git_object: b6f6aa1a811b1a40d9e9a822679ef1d7b3d091ce + docs/Models/Operations/AccountingSalesReceiptsAllResponse.md: + id: 75be52a1f29b + last_write_checksum: sha1:07ea7e9280cfbecad1a726ed1d2c3857f77be0b3 + pristine_git_object: 6fffb48596115bfc69de0fc3beb2f49346704532 + docs/Models/Operations/AccountingSalesReceiptsDeleteRequest.md: + id: 758b61e18072 + last_write_checksum: sha1:b0aaf931b5da2ef623306dc741d1b6697b73bd1d + pristine_git_object: d16ca9f3faabfb0bcccd4ef9a1f588afaa06b495 + docs/Models/Operations/AccountingSalesReceiptsDeleteResponse.md: + id: 950105fb8bac + last_write_checksum: sha1:ada36022b7b77fa366f8b23f36c567fec0146d46 + pristine_git_object: bfee4ea39125358cd8fcda44541f8d878526bbce + docs/Models/Operations/AccountingSalesReceiptsOneRequest.md: + id: 5ad8e6460b40 + last_write_checksum: sha1:9e7717a3884913618aa42bba2e422815e70024af + pristine_git_object: 9965efae4f0e0cf3f11b109a809b8902aa8a6501 + docs/Models/Operations/AccountingSalesReceiptsOneResponse.md: + id: 1667c2d6bba0 + last_write_checksum: sha1:1d0644f0bd53beab16fa6e36b6a492134b8921ed + pristine_git_object: a020f3d0f939b43b5d8dae33da5835c6c19b0472 + docs/Models/Operations/AccountingSalesReceiptsUpdateRequest.md: + id: 1b47a57bdfb8 + last_write_checksum: sha1:e1415f40df0a34061894dae2b66c54e1ca00bd77 + pristine_git_object: 9f84da7ab946fc588a2b411415697484414d51fb + docs/Models/Operations/AccountingSalesReceiptsUpdateResponse.md: + id: d68f11c97e23 + last_write_checksum: sha1:d0f4e76236015e24e1761d61efec78b6237a501a + pristine_git_object: 3648b1f7ebcf001c18fce63b83ea1a6966ea596a docs/Models/Operations/AccountingSubsidiariesAddRequest.md: id: aab956492e22 last_write_checksum: sha1:b0afb33ce1c940fbe103aa66f540027c5737466d @@ -6033,20 +6189,20 @@ trackedFiles: pristine_git_object: fb5566951f7c2bf67f20d108e46cdfb17692f194 docs/Models/Operations/FileStorageFilesDownloadRequest.md: id: 25b5ebe242d3 - last_write_checksum: sha1:c0ee5ea0bf8204484eaea0469c246c2ec1c25f8d - pristine_git_object: 868591b12425d5a210794743fed979c823d99de7 + last_write_checksum: sha1:13c9140dcfcf3e4088270483c94f0cfae103cce6 + pristine_git_object: 77ce530f68ec4f39d55af3f79980949d76663088 docs/Models/Operations/FileStorageFilesDownloadResponse.md: id: 440f1199e455 - last_write_checksum: sha1:ffca251ba2f2698ea7c288a1a27b675962d719ac - pristine_git_object: 4456f2e1128ffc20c534f0b90351d714a4ecba77 + last_write_checksum: sha1:c4de00cf0f1e5b3491f74400eacc28d47517bceb + pristine_git_object: d7da0d786e8a3dc6830f48072cc77ff0d2599718 docs/Models/Operations/FileStorageFilesExportRequest.md: id: 513e12a39d2a last_write_checksum: sha1:d74749331217379a12be09d94e75191623f8b765 pristine_git_object: 4db51d94f10bce113f3f98ea286d63e1965db63f docs/Models/Operations/FileStorageFilesExportResponse.md: id: c86313669635 - last_write_checksum: sha1:c64d454997420ceacaf6375dd88590e8d03d4463 - pristine_git_object: a4e50a703fe7ecdc242338b2c4c7c2c5981dcb49 + last_write_checksum: sha1:520ba095a78af7d1fa359dbd911465266a274f2f + pristine_git_object: fd689b8d5d42700f7ac5b03f596406e85750c8aa docs/Models/Operations/FileStorageFilesOneRequest.md: id: bc0f0d4cbc57 last_write_checksum: sha1:fe9f5b4703d4a38acad45b8a68a5819fc86524fb @@ -6521,32 +6677,32 @@ trackedFiles: pristine_git_object: 223341fdaca4eae847df22c9cc9448f9756462b3 docs/Models/Operations/ProxyDeleteProxyRequest.md: id: fece69b598f2 - last_write_checksum: sha1:18bd4bdd75e5643db61cd189ccb541fb5c152a82 - pristine_git_object: 4f94c2c251a475a5c57c7576f0a5c4f80f7fe9a2 + last_write_checksum: sha1:aa26c4f02489732532b36290c67d89e81edf9671 + pristine_git_object: 1e271ddfa5ee0902a041ea45c17dd22d69e99aa0 docs/Models/Operations/ProxyDeleteProxyResponse.md: id: f60d1b546e01 - last_write_checksum: sha1:b5f1893aed30a6428bd99d0b301acaff466f33af - pristine_git_object: c461061e1111db79af2fd03764bb01af8fcfc29a + last_write_checksum: sha1:1fb0cc1950adfe02cded48dbeff46921a67a943f + pristine_git_object: b9aee2ef6deda3e1c9ccb1bca50a3f90c6eaac6e docs/Models/Operations/ProxyGetProxyRequest.md: id: e1858ca45f74 - last_write_checksum: sha1:d92ff457cab98d5d9019b5e92855a1d0282bd6cb - pristine_git_object: f87f2007bb55f72ceb2e70d6a19f93e6380176e9 + last_write_checksum: sha1:f2afee3a3f43020d6e33211f63991784a147fc50 + pristine_git_object: 662c805b26e3c341c13c87b1295027367f94aa21 docs/Models/Operations/ProxyGetProxyResponse.md: id: aeabb4e4438a - last_write_checksum: sha1:481901e87c93df1b12db280a2aec3609239bd150 - pristine_git_object: a94e6f56bab210845465f9721a594cb6c77e17b3 + last_write_checksum: sha1:b3142a8c203c476d4000b2b502ffad00a77009b2 + pristine_git_object: 8bafd7ade70794b0cf43477bfb9bcc16967debb3 docs/Models/Operations/ProxyOptionsProxyRequest.md: id: 30df28f81061 - last_write_checksum: sha1:bb959fb941673afc2c0c8208d7f5d0d2a200e76c - pristine_git_object: 915e281241489468f761ac37f41408d61a0eead9 + last_write_checksum: sha1:207fa782dda64dcc44e0a48b3342569854a1f38a + pristine_git_object: 5bef3a41752ac1168c9a5e1ee3714ee20f979e51 docs/Models/Operations/ProxyOptionsProxyResponse.md: id: 1361bd5f9822 - last_write_checksum: sha1:6212ee2525d12074461f5b84281292f7b20dd8e6 - pristine_git_object: 82a76b3dce6d613234d6e8f17f741789b61e5c06 + last_write_checksum: sha1:39882984e5b06b3d5d07b411b91b98718170ad99 + pristine_git_object: a375a1dc988c24a406995b62c5912950705958e0 docs/Models/Operations/ProxyPatchProxyRequest.md: id: 4effe43f4222 - last_write_checksum: sha1:aacd9a6584d3515e84215f6995f87c95a350781f - pristine_git_object: 84f58b32ea1f27d6ee692f9af1ff3a2a6d835c64 + last_write_checksum: sha1:0f259b02fd03db06a027a1384ea3ed3b65b56cf7 + pristine_git_object: 75663b69b71d1e8c46ba52255bffacec355e829f docs/Models/Operations/ProxyPatchProxyRequestBody1.md: id: 2062d2c18afa last_write_checksum: sha1:e7e8bbb12c000abebef2594ac8da50e8a7f74560 @@ -6557,24 +6713,24 @@ trackedFiles: pristine_git_object: 8378f5fca87fb01b61609a0c7fca44bde6acdd4e docs/Models/Operations/ProxyPatchProxyResponse.md: id: b1e664de0f6b - last_write_checksum: sha1:3e89310d0ff54dd4f02e00923580bf99c743b664 - pristine_git_object: 7cd824f3fdfdac1055b418793d5b868557ee4eb2 + last_write_checksum: sha1:29832a33e9b1cbc1509ae184dff3bfe37813d9b9 + pristine_git_object: ad825582c0e61d6db04a8035cd7f7347da126820 docs/Models/Operations/ProxyPostProxyRequest.md: id: 99c71a4fd022 - last_write_checksum: sha1:329febec7df97d841ee3894c06c2eec96bd14932 - pristine_git_object: d4cefd9796c7eeae57cc1004fa6816586b7874fb + last_write_checksum: sha1:c23f03e74497ad179ae7424af174af81836a2534 + pristine_git_object: d5336d0c877f60e1bf005fb385bb09f86e7151c1 docs/Models/Operations/ProxyPostProxyResponse.md: id: c66f8cf5e817 - last_write_checksum: sha1:fdb550f01d0ede1b6720fe5cd6abae0e3fb55354 - pristine_git_object: 7e595fac263744ca592811faaf759a90f1806732 + last_write_checksum: sha1:1d16d9e6465b27358eecb2a6955fdaebb270c79d + pristine_git_object: 4428d56a391c69e3a195708d5dd39a6a1279a31c docs/Models/Operations/ProxyPutProxyRequest.md: id: 154594b97a33 - last_write_checksum: sha1:9745cc182e99ce3d64e0f397dc648c6167c25bd7 - pristine_git_object: 963a6a1c242d74fff911eaf1050a98ae21528876 + last_write_checksum: sha1:d7dae205cf45c9771e83f5aa9d12b5aa9f862a08 + pristine_git_object: b3521558642a7d33e2d6ec58c05c02c64a583b5d docs/Models/Operations/ProxyPutProxyResponse.md: id: 1bf0873899f9 - last_write_checksum: sha1:1071886dfe5abec7a0df9553af6406b02befb6b8 - pristine_git_object: 7fb1a6ca16d55ff19a70a6ba63ec814e46548554 + last_write_checksum: sha1:93b3ca93020480c374eae9d060a97ac6a183a5db + pristine_git_object: f9aa7938de27c9ba3457741e8f0ea57c4056e0d6 docs/Models/Operations/RequestBody1.md: id: ea015e298141 last_write_checksum: sha1:439fc916e85d97e47ece746cf2ae73d16023c204 @@ -6929,8 +7085,8 @@ trackedFiles: pristine_git_object: 0980af96ebd1fa4409c6d4c97b7469c807ffd871 docs/sdks/attachments/README.md: id: b60e6ecf628b - last_write_checksum: sha1:020f74f6e07d58e7924e48cb3fcb67f4bd398980 - pristine_git_object: ae620bc50dd1cc4d207324d3274fd893816607c7 + last_write_checksum: sha1:4ad0ff0a22f08155c25a69bc06235f180c371270 + pristine_git_object: 694af43b91413060d66306ce30684277008fb6dd docs/sdks/balancesheet/README.md: id: b360644f6413 last_write_checksum: sha1:b24449be3e3cec66efff34b8edfc3c6a811f1c43 @@ -7101,8 +7257,8 @@ trackedFiles: pristine_git_object: 5b945763c656a5cf8f9faa0018277ec336d96cf3 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:3c1f8f8a7106a39daae45b742d55b2f8a979e9aa - pristine_git_object: 7028d6193fef324524ccf01b9294af7a89be302a + last_write_checksum: sha1:b913e9da5a06e054fd71da7a0c9fd30ed4297a63 + pristine_git_object: 74048867f08cc64fb39f75910816867c90ed42a2 docs/sdks/folders/README.md: id: ffb38e069dec last_write_checksum: sha1:f08307a5095f826b4550c44159e5cfedf952f0ad @@ -7167,6 +7323,10 @@ trackedFiles: id: fc5b2caf3cb2 last_write_checksum: sha1:3c4df25eb4f9c117ca7a77088967771047ff2079 pristine_git_object: 78c493b1e5603812658d1bf24c6926bde2b14c19 + docs/sdks/paymentmethods/README.md: + id: 98b2df26035c + last_write_checksum: sha1:b4b52937140bebeb0cc690e1ce58ab571b74de4a + pristine_git_object: bb163340497c8747774c2444dbae7a92ed35d150 docs/sdks/payments/README.md: id: 0ddb15ec8c20 last_write_checksum: sha1:cccd086d171820409397e5487ffce390d6672818 @@ -7193,8 +7353,8 @@ trackedFiles: pristine_git_object: 769982924f975604f2b9edafd1c32c3e02eaccfe docs/sdks/proxy/README.md: id: 2c72b780f1d0 - last_write_checksum: sha1:4ed92da8f01c37821b6e58804b023b2f518905ef - pristine_git_object: ee9bb0b20bd30dc1d81fd029bfaad684c88c2e90 + last_write_checksum: sha1:f0ce0edb494772bebd31cc3e915ef8e1115762f9 + pristine_git_object: 0eb6607c89ec0a4e1e750f976d3f1c8aeb6aa9e5 docs/sdks/purchaseorders/README.md: id: bdb6c1926bcc last_write_checksum: sha1:18c6e9a9b7e5c309dfc0f7b8fcaa90c75ed84b54 @@ -7207,6 +7367,10 @@ trackedFiles: id: 451a9838a921 last_write_checksum: sha1:c4f6d2e46995311ffc474919a7aa484cffd6225f pristine_git_object: c24be24599c785f30a7f1c4deb87913f43dcde6f + docs/sdks/salesreceipts/README.md: + id: 70fd847a91a7 + last_write_checksum: sha1:2b4412a01dbd523245b28fbbd56d0c86ea0b4bf5 + pristine_git_object: 23f3c09f011be75397b374a79c1f1ebad6c9ef53 docs/sdks/sessions/README.md: id: 57ad62844f79 last_write_checksum: sha1:a93897d5ddf91ec29b2417e90b53a8834909a7ed @@ -7273,8 +7437,8 @@ trackedFiles: pristine_git_object: 40eb9bfbea10383ae16ce195da9113bb2abfc586 src/Accounting.php: id: 83fb9a38ca01 - last_write_checksum: sha1:c8344594d12b05e492ab19841e7cb7c738a2f978 - pristine_git_object: a134df9b5176b8cf7ac8d27046d75d2aac50b530 + last_write_checksum: sha1:f63c04bc5c78cbab1ea242820d2c0509284e7049 + pristine_git_object: 4ab72a015a262e03fb6ef81b4d86ec14c50d83c6 src/Activities.php: id: a8e2e67cf1e0 last_write_checksum: sha1:e7bdb61f52a42a86eb1557cae0df98c2a7276a13 @@ -7731,6 +7895,22 @@ trackedFiles: id: 104dcac7fcee last_write_checksum: sha1:ce80e52fb5d478e64892bef361731b03d428233a pristine_git_object: be4e8a0beeeff19b2239ebddd061b139c879c4b7 + src/Models/Components/AccountingPaymentMethod.php: + id: 45eac7fc0b86 + last_write_checksum: sha1:5e5f23f90f07793aade31f388a451ccce790f437 + pristine_git_object: fa4230f6093d3fe7394b7e60cbff69885ab516df + src/Models/Components/AccountingPaymentMethodInput.php: + id: f4bc19a0c26c + last_write_checksum: sha1:59cabeeb4ae696ba80082bdd4d811e367b2131e3 + pristine_git_object: 2a9aa8827680dc34f2238724ceca681a456811ab + src/Models/Components/AccountingPaymentMethodStatus.php: + id: ed6d9ea1df39 + last_write_checksum: sha1:d0d21263e594be6f2b6b01299485b9dd83ece183 + pristine_git_object: 83447573775d90d8f12f619af6816c5ca1431f05 + src/Models/Components/AccountingPaymentMethodType.php: + id: ee3bc923ce50 + last_write_checksum: sha1:32ba2cd9d84753b57a8773b2d386461bb4b205aa + pristine_git_object: 5d09b5077f8711ee725bff19099c21cadf027bf2 src/Models/Components/AccountingPeriod.php: id: c18b8fab7d6d last_write_checksum: sha1:e7aac2163bfefeb89846e503a1770927498cd8e8 @@ -7885,8 +8065,8 @@ trackedFiles: pristine_git_object: a199ba48165bc833d462c19bfc702c8b552eb098 src/Models/Components/Attachment.php: id: d5fd56e37aa9 - last_write_checksum: sha1:cf02f3eb96d0dde0797d5257a1849f767c8f413e - pristine_git_object: 3882a6615d4967901e107b425bdc1bb7d6c30ef3 + last_write_checksum: sha1:b16236829b4c8c9fa8e94006082f11c63127d360 + pristine_git_object: 1465951c0c8d2dc47a556e7a2788096da03a7916 src/Models/Components/AttachmentReference.php: id: 09c4fe0c6a87 last_write_checksum: sha1:dc3fdd301a825cd4686cbba9703d05ea43bb8174 @@ -7997,12 +8177,12 @@ trackedFiles: pristine_git_object: fd948e395d953ab2b814cda0e3f3c5b2f9cbedbb src/Models/Components/BankFeedAccount.php: id: efbf102a716c - last_write_checksum: sha1:11fb002a57843d15d8be5c9a669df605b622bfef - pristine_git_object: f5176c9438185ba7bfd60222af4698516f4afe79 + last_write_checksum: sha1:b0ba1b75007afd7cf059bea6d008bc9b07dda054 + pristine_git_object: 27b4d00ffa86a3464b7d935aa54e277ef4775c9d src/Models/Components/BankFeedAccountInput.php: id: f033f2b23a05 - last_write_checksum: sha1:077b687e1db57ec5e46ce4b3b4d1ab8d69a2cd27 - pristine_git_object: 0e6d7338a18f4fca769ffaa4123daa7db00994f5 + last_write_checksum: sha1:d4d24d5b22ba47d865c39fbca334d3b1146ebfe4 + pristine_git_object: ab988faf45ea5e1efa458b847648ed58255e0533 src/Models/Components/BankFeedStatement.php: id: f2b962b5daf2 last_write_checksum: sha1:87118ae2de04a4c6db3f80c25d424a783ada2340 @@ -8543,6 +8723,10 @@ trackedFiles: id: ea5700a9ea5e last_write_checksum: sha1:45b31bb3f248efd87877493cf3e7fe9dc838d2c8 pristine_git_object: 5ee122fc9c620aece2ddc973c3004e3217b12d54 + src/Models/Components/CreatePaymentMethodResponse.php: + id: 6bfed6928d92 + last_write_checksum: sha1:9b53894349a0ac312bd73c7425ad5d826d71cc80 + pristine_git_object: 53e0b7e56178c7fa7e0ff38b6fd5b4826fa154d7 src/Models/Components/CreatePaymentResponse.php: id: 8018bc137a0a last_write_checksum: sha1:16328ae13e73dc8b721a3a51426840f9731d8be5 @@ -8567,6 +8751,10 @@ trackedFiles: id: 378bdfd46b02 last_write_checksum: sha1:f44893c03d14f9864a3cefe4978804af2a98293c pristine_git_object: 1e4dd4b6d24d31b6338eca24ad8062b1794ca0a9 + src/Models/Components/CreateSalesReceiptResponse.php: + id: 18a9cc455670 + last_write_checksum: sha1:564ec9c1a9fc405c83fa41d321c7481e88179151 + pristine_git_object: 8959c2390f3cda30e31c033e80685437213b9eb7 src/Models/Components/CreateSessionResponse.php: id: b0faf3de4343 last_write_checksum: sha1:64f397e22d8e0b1df6798eecc3d83d664d642335 @@ -8669,12 +8857,12 @@ trackedFiles: pristine_git_object: 512ee6780d05735e8080b568e32788addbbda307 src/Models/Components/CustomField1.php: id: a3976812e046 - last_write_checksum: sha1:ba8789a241b56a0b3a8027c0983c6b97ab3d6c03 - pristine_git_object: 3f3d6a3f8e44175309e73a22b91b499e4eae43fa + last_write_checksum: sha1:5af917355bcd60e73b41f54f471024ccb8203a57 + pristine_git_object: 9f8c0422198cb3547d6a35c583b9acb7fad32d89 src/Models/Components/CustomField2.php: id: af02cb6beb31 - last_write_checksum: sha1:c07b5d3f84a0c4fedc7aa6ad6a7111500930ecc2 - pristine_git_object: 43576174373bae2be3dec06059801d3bdcf6414c + last_write_checksum: sha1:9d1dbe0950148dc323f086b142702268f98774a6 + pristine_git_object: 1bd1468c0f08c4fc52d2ff8f2bdeb2a1f70f2d21 src/Models/Components/CustomFieldFinder.php: id: dbdff8737e72 last_write_checksum: sha1:1733ddcaa1e9b963c5c9440263a4e49b6b425af5 @@ -8931,6 +9119,10 @@ trackedFiles: id: be56cc1589dd last_write_checksum: sha1:20bbb4eefd9c3766444624abcfda115f16c9526f pristine_git_object: b75322de3b3bcc5bb3d19de4b7242405166e8e00 + src/Models/Components/DeletePaymentMethodResponse.php: + id: 979a59cc5c72 + last_write_checksum: sha1:bc3e157eb60fb5f0b87d52784307c4114225ab8f + pristine_git_object: a545c4823320c5bd68a6bcb03f16fcba1e6817b1 src/Models/Components/DeletePaymentResponse.php: id: d9f2b7527217 last_write_checksum: sha1:a7ae6c93d566d27ea4021467b55ddd07a37c4cce @@ -8955,6 +9147,10 @@ trackedFiles: id: 97d223da624e last_write_checksum: sha1:e99ee56f66e0eb373cd0c16dc38bb0a62ff1377c pristine_git_object: 163db84c056ca5c4c9e0fa4b5bef75454f55a078 + src/Models/Components/DeleteSalesReceiptResponse.php: + id: 589141acb1f0 + last_write_checksum: sha1:97cc0d1bc1949192d3960d8a6c3df80f0c9e397d + pristine_git_object: 54877481ddf81f4ec5c78de71bec3440de006450 src/Models/Components/DeleteSharedLinkResponse.php: id: a8042a4be00c last_write_checksum: sha1:4b311720ab9fc0162a46400a86731b8668c4d467 @@ -9883,6 +10079,14 @@ trackedFiles: id: 435b069c2c66 last_write_checksum: sha1:589ca6021afc9cfbdb668e31d069117c531b9872 pristine_git_object: f4aa0d48bab13f6ceb30b6f8df466dcc77306433 + src/Models/Components/GetPaymentMethodResponse.php: + id: e2c82b6b64aa + last_write_checksum: sha1:c01c06d73090cd265e39461cf86accd3b5a90cd2 + pristine_git_object: 1688a3d4d46c7f011a10e5b67330ac928ea675d3 + src/Models/Components/GetPaymentMethodsResponse.php: + id: 07ac43fe643b + last_write_checksum: sha1:a5237b2085c12c42ef464914fec648ae04dc4d68 + pristine_git_object: 01557d963d990a13d06981f612d30b9b1c64a1ad src/Models/Components/GetPaymentResponse.php: id: 852621e17441 last_write_checksum: sha1:ef8ac35aec204714041477b21188a9c439029a26 @@ -9951,6 +10155,14 @@ trackedFiles: id: 4853de0b16e2 last_write_checksum: sha1:c6a5bc1692d2e088684e56919095e47e9b301a7a pristine_git_object: 5d49339d522838e5a23c58cd2eeaf50cd44f6228 + src/Models/Components/GetSalesReceiptResponse.php: + id: dc217cd99ea0 + last_write_checksum: sha1:ad5f486de83b473c805a9dfd0f748d81aef8f3ad + pristine_git_object: 76a47b7abed1194736fec252b3c17ce304072589 + src/Models/Components/GetSalesReceiptsResponse.php: + id: ec3b60eef130 + last_write_checksum: sha1:7aacf9f50a8865a17e1993d84bf158b8321f020a + pristine_git_object: 3a0d38301a339033b2e5d3f02d6ed53ea666c222 src/Models/Components/GetSharedLinkResponse.php: id: d07ad230a36d last_write_checksum: sha1:1975581024b72f14a9e0ffb2428358f8261ee288 @@ -10857,20 +11069,20 @@ trackedFiles: pristine_git_object: bb7c6c780752818dd439fe8155a17ca92b9999b2 src/Models/Components/Refund.php: id: e21206aefe2d - last_write_checksum: sha1:8eefab086b123c18169f5e95a6c84848afc5f227 - pristine_git_object: f7404fb644e40c177fa2547da0f02f063d766cdb + last_write_checksum: sha1:949f5053e679d25cc44e69905b9e203d324d5bb4 + pristine_git_object: de2898a830770b57b0eeb1aeb42556ebbe41315e src/Models/Components/RefundInput.php: id: 4ad51878d418 - last_write_checksum: sha1:448a0c2abcc48bc53210d1c2dcc6781801ca5a95 - pristine_git_object: 48489a82b212b7efb2dc1bad1f8764a36d954dd3 + last_write_checksum: sha1:beeb8f0dfa88de1c73b82a508e5e7f66a69634fd + pristine_git_object: 74ab9b6b88980adc827f49392a5993723d486124 src/Models/Components/RefundStatus.php: id: 4a5861e07ab2 last_write_checksum: sha1:df119d66c695b3007f2e4a26f237ec0862502ca9 pristine_git_object: 47321207984a23f6b948245370b176c8be324e9b src/Models/Components/RefundType.php: id: 9517f84817f9 - last_write_checksum: sha1:0ae8ecabe3eefa0e951c6b9f9e984acb19d02f99 - pristine_git_object: d4e3c8ed198c574a969b71ce16bce8c090e3571c + last_write_checksum: sha1:d12583551c8976e1766ec5218390154ca6492add + pristine_git_object: c5a6ca36b1952d40fc0e26efb93c4c47c1641a4e src/Models/Components/RefundsFilter.php: id: b1563cdc9e0f last_write_checksum: sha1:8f04d24e348624d3e6515bcc96049db3d89b1483 @@ -10919,6 +11131,26 @@ trackedFiles: id: 09c4db76c703 last_write_checksum: sha1:1f49d856728cef845b07c4037ad729ef8f7c72f1 pristine_git_object: 100c9f18aadb375175bef136134d3e2b70adbbc0 + src/Models/Components/SalesReceipt.php: + id: 9dcbafe68f15 + last_write_checksum: sha1:db58abb1ac42e0bf9fc869fca571a2b49d90e685 + pristine_git_object: 20f70136974088e652d57fd5a5aca0adce2b008c + src/Models/Components/SalesReceiptInput.php: + id: d80c6afeee96 + last_write_checksum: sha1:385517f3b49cb5dc0ece8afb0435b9b7434bddd4 + pristine_git_object: f73dbe4852972b65c678cc3f9458c962bde52465 + src/Models/Components/SalesReceiptsFilter.php: + id: fa6b74fcf0df + last_write_checksum: sha1:25d5d05e1c5219613e9c5db73a889cc288a86e4a + pristine_git_object: 2d9b93d7688a15f47e3b19fb2268492c84295077 + src/Models/Components/SalesReceiptsSort.php: + id: 1998688f7c97 + last_write_checksum: sha1:abb6808736d85678916c834b47566a73e20db7c0 + pristine_git_object: fea29db7ee5a5b4c07983b4a7ba9e780ea8fbaf8 + src/Models/Components/SalesReceiptsSortBy.php: + id: 90c6d1d52b31 + last_write_checksum: sha1:8405ee2ef265eca9fd06b7f986e556a2e4951fa5 + pristine_git_object: ea28232d0a0d98f0e21f98c24914d23e3c2b895a src/Models/Components/Schedule.php: id: 628db11d7b23 last_write_checksum: sha1:39c49bb33a375644b8c6699c8e53dfdc2ee313b9 @@ -11193,8 +11425,8 @@ trackedFiles: pristine_git_object: ef4f3b36d7f9ba935a61e4f2f1ab3f31b24c910e src/Models/Components/Transactions.php: id: 99faaf1f20da - last_write_checksum: sha1:72efa29678095c32e30d5bd9cba45a51fc850b6e - pristine_git_object: d513d64f9f613bed7b621b3b9afb3b1f2985dfc2 + last_write_checksum: sha1:64f1b68454ff5d6e59259ed68e66a766ef74b174 + pristine_git_object: b8709e5fa7a6e3e8cde96a3615c6c35f4db750f2 src/Models/Components/Two.php: id: 11012d9ce7f0 last_write_checksum: sha1:c1742dea05f7a6d5879d01e3e5c941baecf7494a @@ -11415,6 +11647,10 @@ trackedFiles: id: b9ccf947d051 last_write_checksum: sha1:d8983d24f1f521ee14d18c6d089739f2cfa7997d pristine_git_object: dd0eb5cf64f9c14a56d54839be0b100cedc289cf + src/Models/Components/UpdatePaymentMethodResponse.php: + id: 8cb4536175ba + last_write_checksum: sha1:dd4470bf0bbbf0cf23db75649fe942ed2cfa4dc6 + pristine_git_object: 39807167198100c173c53a3b1af521812a3d7de0 src/Models/Components/UpdatePaymentResponse.php: id: db13dfa81f49 last_write_checksum: sha1:44fe2214d693716c6b464a1b3a9c372380229797 @@ -11439,6 +11675,10 @@ trackedFiles: id: c0fd1c480d91 last_write_checksum: sha1:c5466b8a0ed44e2c90cec87cfefd8eb991e986b3 pristine_git_object: c6a99eb11b6193b618d0e9e65f8f54a82d826d66 + src/Models/Components/UpdateSalesReceiptResponse.php: + id: 0728681f6ace + last_write_checksum: sha1:9d052d35bf19a1562bdf60fc9815ae2441f6eca9 + pristine_git_object: 2f1820b186387c2d783c7c8e5aed7eea2f4dcc64 src/Models/Components/UpdateSharedLinkResponse.php: id: aa00dc1e2dbd last_write_checksum: sha1:19ec9c97b25f32201818c7ffceb5ecdf106a7a82 @@ -11705,12 +11945,12 @@ trackedFiles: pristine_git_object: 0cd854e63d429deeea3dadea32d34f3487094a0e src/Models/Operations/AccountingAttachmentsDownloadRequest.php: id: 9c537a8a49ff - last_write_checksum: sha1:28d675c53a0499403bd0c59bff166417f2afb6b5 - pristine_git_object: b164fe6de6a582387c231855d50a2ef85be643b7 + last_write_checksum: sha1:45461e391ad9b739a7547a8158399f1827857807 + pristine_git_object: 2a46ff9b666917869332ac722883f0bfd2c0b184 src/Models/Operations/AccountingAttachmentsDownloadResponse.php: id: 901ad16d69e2 - last_write_checksum: sha1:9e285c38ea1282e108b4e335dbce18a3e9c0852a - pristine_git_object: 84fca06f8dade6285e4bc9fb5abf8b9e115b4b2f + last_write_checksum: sha1:9d16ed120b2a502af5be3dd3554f3ba28313f5b4 + pristine_git_object: 3d9d9613ed1a598b83207e1ff26c5f96deee5bce src/Models/Operations/AccountingAttachmentsOneRequest.php: id: d489ba958b59 last_write_checksum: sha1:f23d60690ee9ba5630a067d135c607037f53f940 @@ -12463,6 +12703,46 @@ trackedFiles: id: ed262540a866 last_write_checksum: sha1:eb04320bf9683248c923076525e740432ac20bce pristine_git_object: f0e5399b2f501c8b7e4d6fca42544103a3ecba5a + src/Models/Operations/AccountingPaymentMethodsAddRequest.php: + id: 3e84ae06e456 + last_write_checksum: sha1:1fb20a5e817beae359dd58a17150f5a58912f767 + pristine_git_object: 5bd378e249a76efbaad80f028e83c96fd4a29aae + src/Models/Operations/AccountingPaymentMethodsAddResponse.php: + id: e2176a5a67ee + last_write_checksum: sha1:535e4a0ce2e344f8133310c987995d310eb8da36 + pristine_git_object: 6e9ce79e3143a46b9598b7dd1b7b0d54903bf23b + src/Models/Operations/AccountingPaymentMethodsAllRequest.php: + id: 132676ab7c45 + last_write_checksum: sha1:0474b948a1ec1272249fdb22f62ffc6360e563f8 + pristine_git_object: faec8ac20e91fc638294a9c492deb129c1e2f817 + src/Models/Operations/AccountingPaymentMethodsAllResponse.php: + id: 8d7b8ea35ff9 + last_write_checksum: sha1:b9b0eb532b3ac09920cd9e3edf4668e117c0bb3c + pristine_git_object: 22797a8e0b4167dc2778f3065a773c8232662f8d + src/Models/Operations/AccountingPaymentMethodsDeleteRequest.php: + id: e0926798a17b + last_write_checksum: sha1:84c1ef3bbe3d612cfb7dbe623dbebdddc2d9f73d + pristine_git_object: a25dddba12cfa5ccef00528c7ed02e36a02c7fd7 + src/Models/Operations/AccountingPaymentMethodsDeleteResponse.php: + id: 0bf05b75a3e1 + last_write_checksum: sha1:b8a85b1c7bfaca4f1300872191dab312f87b978b + pristine_git_object: 17771246ba88d4b80f782cb143214182b10525c9 + src/Models/Operations/AccountingPaymentMethodsOneRequest.php: + id: 16c1e4a5a4de + last_write_checksum: sha1:96153cd34d659e452887ce93ca92107b71c1d04e + pristine_git_object: dc5c62e1fe90a4abf877d43e7b21a628bf12dc66 + src/Models/Operations/AccountingPaymentMethodsOneResponse.php: + id: 6baf5f9a4ada + last_write_checksum: sha1:af6e9139c7b3f2fe51e8dd29d06e08c89cccc5fb + pristine_git_object: c1546cb6b0bc28cc81979870cc2c21d90cd36333 + src/Models/Operations/AccountingPaymentMethodsUpdateRequest.php: + id: e858df905f82 + last_write_checksum: sha1:976a78e02d63a1fa808c91457608d278893b29ff + pristine_git_object: 423438308682d93cc34ae638c49dfda4ef5223da + src/Models/Operations/AccountingPaymentMethodsUpdateResponse.php: + id: 2f3969875977 + last_write_checksum: sha1:5436a3ae68bb85e368ef5058d25300678b659eb3 + pristine_git_object: 542ba2676ebc2a667ff561fca244bc4d866036a2 src/Models/Operations/AccountingPaymentsAddRequest.php: id: 9b4122500a77 last_write_checksum: sha1:8d373af8301c2b268b685c4812354bb2d134a680 @@ -12671,6 +12951,46 @@ trackedFiles: id: 3c5d82b982f5 last_write_checksum: sha1:b02a387af15c9ff813f55b27eb3894827c018364 pristine_git_object: 8385e044738de1aa68e3ba272c9347ffc0ab582b + src/Models/Operations/AccountingSalesReceiptsAddRequest.php: + id: e3e76534c368 + last_write_checksum: sha1:f0ec2267751bf5a74665422ecf1b9039f656ed86 + pristine_git_object: 32dbdf9f7a8dbe4c58c9384c8ea7a35237798c5d + src/Models/Operations/AccountingSalesReceiptsAddResponse.php: + id: adf84b5d05d7 + last_write_checksum: sha1:7740afe3e3f6bd1e2703842b9d14111153714926 + pristine_git_object: 03449d573bd4040b2421f99a2452ba578cd28bcf + src/Models/Operations/AccountingSalesReceiptsAllRequest.php: + id: "405931107034" + last_write_checksum: sha1:c4858a238c80aa1367eabc1205242a43cbfb0b50 + pristine_git_object: 419d547715e1a0d47c7241770445ebdd250385e7 + src/Models/Operations/AccountingSalesReceiptsAllResponse.php: + id: 947e48343599 + last_write_checksum: sha1:3cf6a39fd3edb61882b526859d5a92b0e4e5c256 + pristine_git_object: eadfa39e0c3945fcdeb3fcca32f7a9042407b1f9 + src/Models/Operations/AccountingSalesReceiptsDeleteRequest.php: + id: db559d445ae2 + last_write_checksum: sha1:4294701a0799b115b5c920a832c89b4d363dc723 + pristine_git_object: b47169b48b255715c2f0602ba8592db4de81588a + src/Models/Operations/AccountingSalesReceiptsDeleteResponse.php: + id: aba8e4c1ddd7 + last_write_checksum: sha1:9ef86ae7932b1a79c5411483fa8ac80672a5ca5f + pristine_git_object: 7c4961b75d4029df0f17206fc2a4c2b6db8e01e1 + src/Models/Operations/AccountingSalesReceiptsOneRequest.php: + id: ae8cd0eba8e9 + last_write_checksum: sha1:902038c7a98999d55809a96195fedc8b75f4bc63 + pristine_git_object: b39088d2527979fd265269b27024d15a012b2edf + src/Models/Operations/AccountingSalesReceiptsOneResponse.php: + id: 95c12b72914e + last_write_checksum: sha1:6066cdaed3e74a86e805b6c781ac1f497c75ad12 + pristine_git_object: 72d277a009673f086df8dc1bffb327a3030eb26c + src/Models/Operations/AccountingSalesReceiptsUpdateRequest.php: + id: 0a26d585de99 + last_write_checksum: sha1:1d1a81021bfed04c2d48e73bfa5807b994d2228f + pristine_git_object: 909aa8227503458ad5234c80914901f908287b20 + src/Models/Operations/AccountingSalesReceiptsUpdateResponse.php: + id: 12427d2a1839 + last_write_checksum: sha1:0b0d6ec7bf2a7e4bcc302fa97fc8dd417dcad6e5 + pristine_git_object: 136dc4ecc9dd7e59c7d7d998169ba4f8705edd1d src/Models/Operations/AccountingSubsidiariesAddRequest.php: id: 7628900400ae last_write_checksum: sha1:ca7fc1cd0d8d40c4e91efae2ab495c1c9b4c989d @@ -13593,20 +13913,20 @@ trackedFiles: pristine_git_object: 4cbfca34bb83f32c16f6c4ff2ea338d8b913f286 src/Models/Operations/FileStorageFilesDownloadRequest.php: id: b2ce5e8b97c3 - last_write_checksum: sha1:f90a4e6de0c72c4d8c22bedea722b84a854346b3 - pristine_git_object: 1cfdf3a7b64c447967c813dc1e4cadd452371341 + last_write_checksum: sha1:458d9eef76c7030eabe73f0d22f3da25a24a9e36 + pristine_git_object: 47ef6a4c53e0b6b847ac33e968204469653670d1 src/Models/Operations/FileStorageFilesDownloadResponse.php: id: f3332e7425cb - last_write_checksum: sha1:c4fec84ce2140eb859689d9cc6a876e1ecfdabc2 - pristine_git_object: 1000cdd8d34d078914b5c85d08bd8bb6e319a0af + last_write_checksum: sha1:762185ce8c8394b01bd5628f98e1b20d13020e75 + pristine_git_object: afd2bca6da0615e9f136fa44907dacb08b8ee344 src/Models/Operations/FileStorageFilesExportRequest.php: id: 0afb69f486cc last_write_checksum: sha1:2a4f635965e5fe442aece73e4a3a4f824f2179c1 pristine_git_object: fe6bc4096fff0848701bc4d68cbb656d21168f4e src/Models/Operations/FileStorageFilesExportResponse.php: id: c2f924c9704f - last_write_checksum: sha1:33e4ee3d1f8f97d3a78a3fa4e7907f125a36148c - pristine_git_object: 10cea10b49d4532a069a6dae149553d61e78aecb + last_write_checksum: sha1:7f6c0e69646d869c2d5c090d91f265f93704b9fe + pristine_git_object: 4904b58dfbf997b03074de3f1cfb8ffee292edc8 src/Models/Operations/FileStorageFilesOneRequest.php: id: 855a2a07d747 last_write_checksum: sha1:a3736039c44803db820569c5f07bcdcc6a8af999 @@ -14081,32 +14401,32 @@ trackedFiles: pristine_git_object: bab8d886687f4e4386dbd4ee6fbaed56032cef49 src/Models/Operations/ProxyDeleteProxyRequest.php: id: 12d2e9a432f6 - last_write_checksum: sha1:153357489a35afcc67dd4889abbe845f5e9e6b8f - pristine_git_object: de9c61b0ce54c6ac364dfb9144f8391010fefa6a + last_write_checksum: sha1:7659681619fc19c5cbd12e73cb86f63ba87308e5 + pristine_git_object: d4913d7b101bf042782e324a75d4126f2eb70ad7 src/Models/Operations/ProxyDeleteProxyResponse.php: id: 0e16e683dc65 - last_write_checksum: sha1:0a9c74f67799c53d53598cde3ceca0342060981f - pristine_git_object: 0530794edb42fd1bdae66e174d61c38472162850 + last_write_checksum: sha1:7ac4b0a17eaeab5372d10eb0bcd50a9150d9bf1c + pristine_git_object: 745b474b1876380488fb0129c98e37fa06e87987 src/Models/Operations/ProxyGetProxyRequest.php: id: 0cc9fb07c71b - last_write_checksum: sha1:d9b023eaadb264960d251c456991c2d6f6e5a1ab - pristine_git_object: 7863a9c487f8a08006aa0032441824c75d10646b + last_write_checksum: sha1:58d3a7affc780a03bbe7758e07e11613786c7711 + pristine_git_object: 66b23cb73ec04e70a6d7f157aef1538599f18608 src/Models/Operations/ProxyGetProxyResponse.php: id: 3b9c445e21e6 - last_write_checksum: sha1:46df32450a4fc2526f70ab1a8b313b8f485f6589 - pristine_git_object: 3d822e091c69a149538da1e185a36b920965f1c6 + last_write_checksum: sha1:1b0ac5ddab35bf199bec7e3e124d41f34dd8568d + pristine_git_object: 0e4de5c7c3c7db1ad192719bbdcaa7ae78fea388 src/Models/Operations/ProxyOptionsProxyRequest.php: id: 0f1325b3db67 - last_write_checksum: sha1:2607f6e4ee44068ab5f5b5ba60a9ca224bf204d5 - pristine_git_object: 0fedda907242b80f7869b53b0212b4094b576d28 + last_write_checksum: sha1:dea4aa77719d885862846d91df88b0c2abe8dc57 + pristine_git_object: 3b52b71425938433e26e0b04136b597ea869c738 src/Models/Operations/ProxyOptionsProxyResponse.php: id: 5d821509850e - last_write_checksum: sha1:e7a6309e0428051c58a7373365f8795b0602b435 - pristine_git_object: 83f36b2d45bf2442aa2c8a16dafbeee818dea52b + last_write_checksum: sha1:b49ac84890967df62be04f7f31051ece2e8367c6 + pristine_git_object: 962ec5910c6bb70a9f286c80145dc430eeffddf2 src/Models/Operations/ProxyPatchProxyRequest.php: id: 843f14caaffe - last_write_checksum: sha1:efcbca7bd7e535e55064c6870661951420822228 - pristine_git_object: 61ce12613f78344c4913597b697f74e23aa8ff1b + last_write_checksum: sha1:df0632c4642a18d4baa99b8c05e103ed698c54be + pristine_git_object: bc81ced207872b8e1dbd7585c0c45c7e89cbd78e src/Models/Operations/ProxyPatchProxyRequestBody1.php: id: 47f2fd2af5a9 last_write_checksum: sha1:ad81fd53436e52aad45be167cffc3b1cf6f869d3 @@ -14117,24 +14437,24 @@ trackedFiles: pristine_git_object: e8fb98bd41cff8e270064ff5c9aef2a2ce51e922 src/Models/Operations/ProxyPatchProxyResponse.php: id: 6a82b5e44434 - last_write_checksum: sha1:f39a27aa6d4c1551c539ff6649db6c9e758bd6cd - pristine_git_object: 9987dfad7820b037f4e5297bf6817761d505a411 + last_write_checksum: sha1:b5ef94274d820705659f3095e39241a010bf02c8 + pristine_git_object: ff3b552801c021d236a53c4a23c873fa07d66d6b src/Models/Operations/ProxyPostProxyRequest.php: id: 0ebb082c9521 - last_write_checksum: sha1:65fb38bc2f43d2fdc8253897af73af44fa16d384 - pristine_git_object: 1dfcd88da44cfd388832e498ed5f8c9e4a198da2 + last_write_checksum: sha1:12289502f4e64242d0483182080628597ca59148 + pristine_git_object: 6f48a3215d0c5074c1275eb5793f456fca59b8f5 src/Models/Operations/ProxyPostProxyResponse.php: id: 575cf11d8046 - last_write_checksum: sha1:296bc6ffbcea1481b31db295e436f72d67e5e497 - pristine_git_object: 27515fb9a3276c721a62c640264c16f08741b7b0 + last_write_checksum: sha1:2f3d5e37ea8b9ba7cfbae5d77431d0132d371686 + pristine_git_object: 641f507ce1146d691d7ea38cd9e149595801f981 src/Models/Operations/ProxyPutProxyRequest.php: id: 90697fe37f8b - last_write_checksum: sha1:fb7595cf73684a6cf95587c70eb7ee797d1a43f7 - pristine_git_object: 1037c445a47b4e5c5ef657313475f76557aa8691 + last_write_checksum: sha1:2ee93e2c405aa9642e2eb3c1d00336a7f2851ca3 + pristine_git_object: ef15de1d0fa54a568f4505da5c0a0a108ee76c8e src/Models/Operations/ProxyPutProxyResponse.php: id: 720f4ee3c7a3 - last_write_checksum: sha1:a53f6728451739cfd0621999aa8e9a07b32a1429 - pristine_git_object: b24095b9f3d53c2654ee67d081eb4cf7947f322f + last_write_checksum: sha1:46b323029aae8f978860c927a1532c4c2ce9825b + pristine_git_object: 73a047ac5a5ebbf59d7ef2311b0dab0d37316013 src/Models/Operations/RequestBody1.php: id: cefca4e5665a last_write_checksum: sha1:a27907bd39ce83136d6b5be3356102c6d9076211 @@ -14447,6 +14767,10 @@ trackedFiles: id: f1b96c3c0ed0 last_write_checksum: sha1:16324a69af0d50a379dcd925e974687dce2fdfd9 pristine_git_object: f5109bf7a871e5f85fb849e02dd4d534c4a617b2 + src/PaymentMethods.php: + id: 1927abc4f8e2 + last_write_checksum: sha1:0f2ef9dd5ca61ecabe4687a23665a918a5b6924f + pristine_git_object: e38826f833230b4589190710bbccef996c0d6df9 src/Payments.php: id: 554fb3408dc6 last_write_checksum: sha1:6154309b03f68af3c19fe11f8d25fc03f1016ed7 @@ -14489,8 +14813,12 @@ trackedFiles: pristine_git_object: 1b84a996bbe4b1742310466f6289fde44ac8a13c src/SDKConfiguration.php: id: 9d60ab0bec0b - last_write_checksum: sha1:17ccc7dadbed744bd2ab3c06cf443f44f08cd11d - pristine_git_object: a9bddc92595bf407828a6ac67ae10e1991cfa188 + last_write_checksum: sha1:8e76385be2acdd20d5f441e410a3fbf2963793f0 + pristine_git_object: cadfbae2eb25eed6f0d8f9812cc1f498ee98f381 + src/SalesReceipts.php: + id: 671bcf284513 + last_write_checksum: sha1:c593f9a727511a6f194dffbf802d5895081caeb9 + pristine_git_object: 614a6ec5f0f249889620235c061113886eb2c9a9 src/Sessions.php: id: 7f6ea05b19ca last_write_checksum: sha1:49fed08b188438bf50f8af86d8631d9f3bf3cd5f @@ -18818,7 +19146,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": @@ -18927,6 +19255,7 @@ examples: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" x-apideck-service-id: "salesforce" x-apideck-company-id: "12345" + x-apideck-follow-redirects: false responses: "200": '*/*': "0x25677bd0eB" @@ -19939,7 +20268,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"}} @@ -19996,7 +20325,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": @@ -20048,7 +20377,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"}} @@ -23824,6 +24153,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": '*/*': "0x256EFBeFD2" @@ -30300,6 +30630,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": ""} @@ -30326,6 +30657,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": ""} @@ -30352,6 +30684,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": ""} @@ -30378,6 +30711,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": ""} @@ -30404,6 +30738,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": ""} @@ -30430,6 +30765,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": ""} @@ -31263,9 +31599,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: "## Php SDK Changes:\n* `apideck->webhook->webhooks->list()`: `response.data[]->events[]->enum(vault.connection.migrated)` **Added** (Breaking ⚠️)\n* `apideck->webhook->webhooks->create()`: \n * `request.createWebhookRequest->events[]->enum(vault.connection.migrated)` **Added**\n * `response.data->events[]->enum(vault.connection.migrated)` **Added** (Breaking ⚠️)\n* `apideck->webhook->webhooks->get()`: `response.data->events[]->enum(vault.connection.migrated)` **Added** (Breaking ⚠️)\n* `apideck->webhook->webhooks->update()`: \n * `request.updateWebhookRequest->events[]->enum(vault.connection.migrated)` **Added**\n * `response.data->events[]->enum(vault.connection.migrated)` **Added** (Breaking ⚠️)\n* `apideck->webhook->webhooks->delete()`: `response.data->events[]->enum(vault.connection.migrated)` **Added** (Breaking ⚠️)\n* `apideck->crm->listMembers->list()`: **Added**\n* `apideck->vault->connections->migrate()`: **Added**\n* `apideck->connector->connectors->list()`: `response.data[]->migrationTargets` **Added**\n* `apideck->connector->connectors->get()`: `response.data->migrationTargets` **Added**\n" +releaseNotes: "## Php SDK Changes:\n* `apideck->accounting->refunds->list()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `apideck->accounting->refunds->get()`: `response.data` **Changed** (Breaking ⚠️)\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->create()`: \n * `request->refund` **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 3c203397..8a72eb57 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false php: - version: 0.22.0 + version: 0.23.0 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0d5543ad..8b3595f3 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,20 +1,20 @@ -speakeasyVersion: 1.791.4 +speakeasyVersion: 1.793.2 sources: Apideck: sourceNamespace: apideck - sourceRevisionDigest: sha256:1c6092eb51bb1bc843fc7faf1a2482c1fa02091833fea4de3ff175f01704badd - sourceBlobDigest: sha256:c0e56ff09e13c899e55da0cdad6f1aab6c5420a5616c5d0f1c023800aac22aee + sourceRevisionDigest: sha256:c31395db94ec1fe500ce51461ccc1813d151ac47889d8269e71a9f23d475fe23 + sourceBlobDigest: sha256:e9f38a72ea1507aeabf625c6b6c8b48f4221a55f670e3e2ac9fb499ee3234657 tags: - latest - - 10.32.0 + - 10.38.1 targets: apideck: source: Apideck sourceNamespace: apideck - sourceRevisionDigest: sha256:1c6092eb51bb1bc843fc7faf1a2482c1fa02091833fea4de3ff175f01704badd - sourceBlobDigest: sha256:c0e56ff09e13c899e55da0cdad6f1aab6c5420a5616c5d0f1c023800aac22aee + sourceRevisionDigest: sha256:c31395db94ec1fe500ce51461ccc1813d151ac47889d8269e71a9f23d475fe23 + sourceBlobDigest: sha256:e9f38a72ea1507aeabf625c6b6c8b48f4221a55f670e3e2ac9fb499ee3234657 codeSamplesNamespace: apideck-php-code-samples - codeSamplesRevisionDigest: sha256:463074c4e1d5cacb1dbbd85b4dfd5d899a74b594b7fcd400e91646e2ae7839e5 + codeSamplesRevisionDigest: sha256:2340b4c0e1f864097c94a6eb75a0c7a2c3888ecd95533300f2db558661df4f72 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 028e7e0c..469a54ad 100644 --- a/README.md +++ b/README.md @@ -336,6 +336,14 @@ foreach ($responses as $response) { * [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 @@ -380,6 +388,14 @@ foreach ($responses as $response) { * [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 diff --git a/RELEASES.md b/RELEASES.md index 929483ae..7cb36e48 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -938,4 +938,14 @@ Based on: ### Generated - [php v0.22.0] . ### Releases -- [Composer v0.22.0] https://packagist.org/packages/apideck-libraries/sdk-php#v0.22.0 - . \ No newline at end of file +- [Composer v0.22.0] https://packagist.org/packages/apideck-libraries/sdk-php#v0.22.0 - . + +## 2026-08-14 13:05:25 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.793.2 (2.928.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.23.0] . +### Releases +- [Composer v0.23.0] https://packagist.org/packages/apideck-libraries/sdk-php#v0.23.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 00000000..e10fd56e --- /dev/null +++ b/docs/Models/Components/AccountingPaymentMethod.md @@ -0,0 +1,19 @@ +# AccountingPaymentMethod + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `name` | *?string* | :heavy_minus_sign: | The name of the payment method. | Cash | +| `type` | [?Components\AccountingPaymentMethodType](../../Models/Components/AccountingPaymentMethodType.md) | :heavy_minus_sign: | The type of payment method. | cash | +| `status` | [?Components\AccountingPaymentMethodStatus](../../Models/Components/AccountingPaymentMethodStatus.md) | :heavy_minus_sign: | The status of the payment method. | active | +| `customMappings` | array | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `downstreamId` | *?string* | :heavy_minus_sign: | The third-party API ID of original entity | 12345 | +| `rowVersion` | *?string* | :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` | *?string* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *?string* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updatedAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `passThrough` | array<[Components\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 00000000..3a7d81d2 --- /dev/null +++ b/docs/Models/Components/AccountingPaymentMethodInput.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *?string* | :heavy_minus_sign: | The name of the payment method. | Cash | +| `type` | [?Components\AccountingPaymentMethodType](../../Models/Components/AccountingPaymentMethodType.md) | :heavy_minus_sign: | The type of payment method. | cash | +| `status` | [?Components\AccountingPaymentMethodStatus](../../Models/Components/AccountingPaymentMethodStatus.md) | :heavy_minus_sign: | The status of the payment method. | active | +| `rowVersion` | *?string* | :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` | array<[Components\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 00000000..a55ea78e --- /dev/null +++ b/docs/Models/Components/AccountingPaymentMethodStatus.md @@ -0,0 +1,11 @@ +# AccountingPaymentMethodStatus + +The status of the payment method. + + +## 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 00000000..727a5c89 --- /dev/null +++ b/docs/Models/Components/AccountingPaymentMethodType.md @@ -0,0 +1,17 @@ +# AccountingPaymentMethodType + +The type of payment method. + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `Cash` | cash | +| `Check` | check | +| `CreditCard` | credit_card | +| `DebitCard` | debit_card | +| `BankTransfer` | 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 af608745..883cfb2d 100644 --- a/docs/Models/Components/Attachment.md +++ b/docs/Models/Components/Attachment.md @@ -12,6 +12,7 @@ | `size` | *?int* | :heavy_minus_sign: | The size of the file in bytes | 1810673 | | `reference` | [?Components\AttachmentReference](../../Models/Components/AttachmentReference.md) | :heavy_minus_sign: | N/A | | | `description` | *?string* | :heavy_minus_sign: | Optional description of the file | A sample image | +| `fileUrl` | *?string* | :heavy_minus_sign: | The URL to download or preview the file | https://example.com/files/sample.jpg | | `parentFolderId` | *?string* | :heavy_minus_sign: | The folder id where this attachment belong to | 123 | | `updatedBy` | *?string* | :heavy_minus_sign: | The user who last updated the object. | 12345 | | `createdBy` | *?string* | :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 4a21fdff..b6024e1b 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` | [?Components\BankAccountType](../../Models/Components/BankAccountType.md) | :heavy_minus_sign: | Type of the bank account. | bank | | `sourceAccountId` | *?string* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `sourceRoutingNumber` | *?string* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `sourceAccountNumber` | *?string* | :heavy_minus_sign: | The bank account number | 123465 | | `targetAccountId` | *?string* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | | `targetAccountName` | *?string* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | | `targetAccountNumber` | *?string* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `balance` | *?float* | :heavy_minus_sign: | The current balance of the source bank account. | 25000 | +| `availableBalance` | *?float* | :heavy_minus_sign: | The available balance of the source bank account (considering pending transactions and overdraft). | 24500 | | `currency` | [?Components\Currency](../../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` | [?Components\FeedStatus](../../Models/Components/FeedStatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | | `country` | *?string* | :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 eba10c1d..25c4eb4b 100644 --- a/docs/Models/Components/BankFeedAccountInput.md +++ b/docs/Models/Components/BankFeedAccountInput.md @@ -7,9 +7,13 @@ | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `bankAccountType` | [?Components\BankAccountType](../../Models/Components/BankAccountType.md) | :heavy_minus_sign: | Type of the bank account. | bank | | `sourceAccountId` | *?string* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `sourceRoutingNumber` | *?string* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `sourceAccountNumber` | *?string* | :heavy_minus_sign: | The bank account number | 123465 | | `targetAccountId` | *?string* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | | `targetAccountName` | *?string* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | | `targetAccountNumber` | *?string* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `balance` | *?float* | :heavy_minus_sign: | The current balance of the source bank account. | 25000 | +| `availableBalance` | *?float* | :heavy_minus_sign: | The available balance of the source bank account (considering pending transactions and overdraft). | 24500 | | `currency` | [?Components\Currency](../../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` | [?Components\FeedStatus](../../Models/Components/FeedStatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | | `country` | *?string* | :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 00000000..838c0ef0 --- /dev/null +++ b/docs/Models/Components/CreatePaymentMethodResponse.md @@ -0,0 +1,16 @@ +# CreatePaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\UnifiedId](../../Models/Components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | array | :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 00000000..0dfd43eb --- /dev/null +++ b/docs/Models/Components/CreateSalesReceiptResponse.md @@ -0,0 +1,16 @@ +# CreateSalesReceiptResponse + +SalesReceipt created + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\UnifiedId](../../Models/Components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | array | :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 9ff7b64f..8a2f5e98 100644 --- a/docs/Models/Components/CustomField1.md +++ b/docs/Models/Components/CustomField1.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Unique identifier for the custom field. | 2389328923893298 | -| `name` | *?string* | :heavy_minus_sign: | Name of the custom field. | employee_level | -| `description` | *?string* | :heavy_minus_sign: | More information about the custom field | Employee Level | -| `value` | [string\|float\|bool\|array\|null](../../Models/Components/CustomField1Value.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the custom field. | 2389328923893298 | +| `name` | *?string* | :heavy_minus_sign: | Name of the custom field. | employee_level | +| `refName` | *?string* | :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` | *?string* | :heavy_minus_sign: | More information about the custom field | Employee Level | +| `value` | [string\|float\|bool\|array\|null](../../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 d2521284..d340cd5f 100644 --- a/docs/Models/Components/CustomField2.md +++ b/docs/Models/Components/CustomField2.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `id` | *?string* | :heavy_minus_sign: | Unique identifier for the custom field. | 2389328923893298 | -| `name` | *string* | :heavy_check_mark: | Name of the custom field. | employee_level | -| `description` | *?string* | :heavy_minus_sign: | More information about the custom field | Employee Level | -| `value` | [string\|float\|bool\|array\|null](../../Models/Components/CustomFieldValue.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *?string* | :heavy_minus_sign: | Unique identifier for the custom field. | 2389328923893298 | +| `name` | *string* | :heavy_check_mark: | Name of the custom field. | employee_level | +| `refName` | *?string* | :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` | *?string* | :heavy_minus_sign: | More information about the custom field | Employee Level | +| `value` | [string\|float\|bool\|array\|null](../../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 00000000..b4cf20f4 --- /dev/null +++ b/docs/Models/Components/DeletePaymentMethodResponse.md @@ -0,0 +1,16 @@ +# DeletePaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\UnifiedId](../../Models/Components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | array | :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 00000000..38bb6420 --- /dev/null +++ b/docs/Models/Components/DeleteSalesReceiptResponse.md @@ -0,0 +1,16 @@ +# DeleteSalesReceiptResponse + +SalesReceipt deleted + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\UnifiedId](../../Models/Components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | array | :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 00000000..9fc6d6dd --- /dev/null +++ b/docs/Models/Components/GetPaymentMethodResponse.md @@ -0,0 +1,17 @@ +# GetPaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\AccountingPaymentMethod](../../Models/Components/AccountingPaymentMethod.md) | :heavy_check_mark: | N/A | | +| `meta` | [?Components\Meta](../../Models/Components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `raw` | array | :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 00000000..28f197f4 --- /dev/null +++ b/docs/Models/Components/GetPaymentMethodsResponse.md @@ -0,0 +1,18 @@ +# GetPaymentMethodsResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | array<[Components\AccountingPaymentMethod](../../Models/Components/AccountingPaymentMethod.md)> | :heavy_check_mark: | N/A | | +| `meta` | [?Components\Meta](../../Models/Components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [?Components\Links](../../Models/Components/Links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | array | :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 00000000..dd113dba --- /dev/null +++ b/docs/Models/Components/GetSalesReceiptResponse.md @@ -0,0 +1,17 @@ +# GetSalesReceiptResponse + +SalesReceipt + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\SalesReceipt](../../Models/Components/SalesReceipt.md) | :heavy_check_mark: | N/A | | +| `meta` | [?Components\Meta](../../Models/Components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `raw` | array | :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 00000000..2929c982 --- /dev/null +++ b/docs/Models/Components/GetSalesReceiptsResponse.md @@ -0,0 +1,18 @@ +# GetSalesReceiptsResponse + +SalesReceipts + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | array<[Components\SalesReceipt](../../Models/Components/SalesReceipt.md)> | :heavy_check_mark: | N/A | | +| `meta` | [?Components\Meta](../../Models/Components/Meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [?Components\Links](../../Models/Components/Links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | array | :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 fb57bed2..e0ac08a9 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` | *?string* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | -| `customer` | [?Components\LinkedCustomer](../../Models/Components/LinkedCustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | -| `companyId` | *?string* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `currency` | [?Components\Currency](../../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` | *?float* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `taxInclusive` | *?bool* | :heavy_minus_sign: | Amounts are including tax | true | -| `subTotal` | *?float* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | -| `totalAmount` | *float* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | -| `totalTax` | *?float* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | -| `refundDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| `status` | [?Components\RefundStatus](../../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` | [?Components\RefundType](../../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` | *?string* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | -| `paymentMethodReference` | *?string* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | -| `paymentMethodId` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `account` | [?Components\LinkedLedgerAccount](../../Models/Components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | -| `lineItems` | array<[Components\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` | array<[Components\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` | *?string* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | -| `discountPercentage` | *?float* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | -| `discountAmount` | *?float* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | -| `note` | *?string* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | -| `customerMemo` | *?string* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | -| `reference` | *?string* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | -| `billingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | -| `shippingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | -| `department` | [?Components\LinkedDepartment](../../Models/Components/LinkedDepartment.md) | :heavy_minus_sign: | N/A | | -| `location` | [?Components\LinkedLocation](../../Models/Components/LinkedLocation.md) | :heavy_minus_sign: | N/A | | -| `trackingCategories` | array<[Components\LinkedTrackingCategory](../../Models/Components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `customMappings` | array | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | -| `customFields` | array<[Components\CustomField1\|Components\CustomField2](../../Models/Components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `rowVersion` | *?string* | :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` | *?string* | :heavy_minus_sign: | The user who last updated the object. | 12345 | -| `createdBy` | *?string* | :heavy_minus_sign: | The user who created the object. | 12345 | -| `updatedAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | -| `createdAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | -| `passThrough` | array<[Components\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` | *?string* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | +| `customer` | [?Components\LinkedCustomer](../../Models/Components/LinkedCustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `companyId` | *?string* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `currency` | [?Components\Currency](../../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` | *?float* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *?bool* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *?float* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *float* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *?float* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `refundDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `status` | [?Components\RefundStatus](../../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` | [?Components\RefundType](../../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` | *?string* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *?string* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [?Components\LinkedLedgerAccount](../../Models/Components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | array<[Components\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` | array<[Components\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` | *?string* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *?float* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | +| `discountAmount` | *?float* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | +| `note` | *?string* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | +| `customerMemo` | *?string* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *?string* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | +| `billingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [?Components\LinkedDepartment](../../Models/Components/LinkedDepartment.md) | :heavy_minus_sign: | N/A | | +| `location` | [?Components\LinkedLocation](../../Models/Components/LinkedLocation.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | array<[Components\LinkedTrackingCategory](../../Models/Components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customMappings` | array | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `customFields` | array<[Components\CustomField1\|Components\CustomField2](../../Models/Components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *?string* | :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` | *?string* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *?string* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updatedAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `passThrough` | array<[Components\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 1f3dc870..9b678b0d 100644 --- a/docs/Models/Components/RefundInput.md +++ b/docs/Models/Components/RefundInput.md @@ -3,37 +3,37 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `number` | *?string* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | -| `customer` | [?Components\LinkedCustomerInput](../../Models/Components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | -| `companyId` | *?string* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | -| `currency` | [?Components\Currency](../../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` | *?float* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | -| `taxInclusive` | *?bool* | :heavy_minus_sign: | Amounts are including tax | true | -| `subTotal` | *?float* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | -| `totalAmount` | *float* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | -| `totalTax` | *?float* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | -| `refundDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | -| `status` | [?Components\RefundStatus](../../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` | [?Components\RefundType](../../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` | *?string* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | -| `paymentMethodReference` | *?string* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | -| `paymentMethodId` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `account` | [?Components\LinkedLedgerAccount](../../Models/Components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | -| `lineItems` | array<[Components\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` | array<[Components\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` | *?string* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | -| `discountPercentage` | *?float* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | -| `discountAmount` | *?float* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | -| `note` | *?string* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | -| `customerMemo` | *?string* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | -| `reference` | *?string* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | -| `billingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | -| `shippingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | -| `department` | [?Components\LinkedDepartmentInput](../../Models/Components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | -| `location` | [?Components\LinkedLocationInput](../../Models/Components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | -| `trackingCategories` | array<[Components\LinkedTrackingCategory](../../Models/Components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | -| `customFields` | array<[Components\CustomField1\|Components\CustomField2](../../Models/Components/CustomField.md)> | :heavy_minus_sign: | N/A | | -| `rowVersion` | *?string* | :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` | array<[Components\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` | *?string* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | +| `customer` | [?Components\LinkedCustomerInput](../../Models/Components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `companyId` | *?string* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `currency` | [?Components\Currency](../../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` | *?float* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *?bool* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *?float* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *float* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *?float* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `refundDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `status` | [?Components\RefundStatus](../../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` | [?Components\RefundType](../../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` | *?string* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *?string* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [?Components\LinkedLedgerAccount](../../Models/Components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | array<[Components\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` | array<[Components\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` | *?string* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *?float* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | +| `discountAmount` | *?float* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | +| `note` | *?string* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | +| `customerMemo` | *?string* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *?string* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | +| `billingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [?Components\LinkedDepartmentInput](../../Models/Components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `location` | [?Components\LinkedLocationInput](../../Models/Components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | array<[Components\LinkedTrackingCategory](../../Models/Components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | array<[Components\CustomField1\|Components\CustomField2](../../Models/Components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *?string* | :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` | array<[Components\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 602404eb..b8dd8a5f 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. ## Values @@ -9,4 +9,5 @@ Type of refund. `refund_receipt` for itemized refunds with product/service lines | ------------------ | ------------------ | | `RefundReceipt` | refund_receipt | | `CashRefund` | cash_refund | -| `CreditNoteRefund` | credit_note_refund | \ No newline at end of file +| `CreditNoteRefund` | credit_note_refund | +| `SaleRefund` | 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 00000000..0012c41e --- /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` | *?string* | :heavy_minus_sign: | Reference number for the sales receipt. | SR-00001 | +| `customer` | [?Components\LinkedCustomer](../../Models/Components/LinkedCustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `currency` | [?Components\Currency](../../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` | *?float* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *?bool* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *?float* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *float* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *?float* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `transactionDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `paymentMethod` | *?string* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *?string* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [?Components\LinkedLedgerAccount](../../Models/Components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | array<[Components\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` | *?string* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *?float* | :heavy_minus_sign: | Discount percentage applied to this sales receipt. | 5.5 | +| `discountAmount` | *?float* | :heavy_minus_sign: | Discount amount applied to this sales receipt. | 25 | +| `note` | *?string* | :heavy_minus_sign: | Optional note to be associated with the sales receipt. | Thank you for your purchase | +| `customerMemo` | *?string* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *?string* | :heavy_minus_sign: | Optional reference message for the sales receipt. | REF-123456 | +| `billingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [?Components\LinkedDepartment](../../Models/Components/LinkedDepartment.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | array<[Components\LinkedTrackingCategory](../../Models/Components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customMappings` | array | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `customFields` | array<[Components\CustomField1\|Components\CustomField2](../../Models/Components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *?string* | :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` | *?string* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `createdBy` | *?string* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updatedAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `createdAt` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `passThrough` | array<[Components\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 00000000..20800c28 --- /dev/null +++ b/docs/Models/Components/SalesReceiptInput.md @@ -0,0 +1,34 @@ +# SalesReceiptInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *?string* | :heavy_minus_sign: | Reference number for the sales receipt. | SR-00001 | +| `customer` | [?Components\LinkedCustomerInput](../../Models/Components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `currency` | [?Components\Currency](../../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` | *?float* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *?bool* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *?float* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *float* | :heavy_check_mark: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *?float* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `transactionDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `paymentMethod` | *?string* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *?string* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *?string* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [?Components\LinkedLedgerAccount](../../Models/Components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | array<[Components\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` | *?string* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *?float* | :heavy_minus_sign: | Discount percentage applied to this sales receipt. | 5.5 | +| `discountAmount` | *?float* | :heavy_minus_sign: | Discount amount applied to this sales receipt. | 25 | +| `note` | *?string* | :heavy_minus_sign: | Optional note to be associated with the sales receipt. | Thank you for your purchase | +| `customerMemo` | *?string* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *?string* | :heavy_minus_sign: | Optional reference message for the sales receipt. | REF-123456 | +| `billingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [?Components\Address](../../Models/Components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [?Components\LinkedDepartmentInput](../../Models/Components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | array<[Components\LinkedTrackingCategory](../../Models/Components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | array<[Components\CustomField1\|Components\CustomField2](../../Models/Components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *?string* | :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` | array<[Components\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 00000000..cbee4e1a --- /dev/null +++ b/docs/Models/Components/SalesReceiptsFilter.md @@ -0,0 +1,9 @@ +# SalesReceiptsFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `updatedSince` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_minus_sign: | N/A | 2020-09-30T07:43:32.000Z | +| `customerId` | *?string* | :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 00000000..006cad20 --- /dev/null +++ b/docs/Models/Components/SalesReceiptsSort.md @@ -0,0 +1,9 @@ +# SalesReceiptsSort + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `by` | [?Components\SalesReceiptsSortBy](../../Models/Components/SalesReceiptsSortBy.md) | :heavy_minus_sign: | The field on which to sort the Sales Receipts. | updated_at | +| `direction` | [?Components\SortDirection](../../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 00000000..2b0063c4 --- /dev/null +++ b/docs/Models/Components/SalesReceiptsSortBy.md @@ -0,0 +1,11 @@ +# SalesReceiptsSortBy + +The field on which to sort the Sales Receipts. + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `UpdatedAt` | updated_at | +| `CreatedAt` | created_at | \ No newline at end of file diff --git a/docs/Models/Components/Transactions.md b/docs/Models/Components/Transactions.md index 56162349..ff05423e 100644 --- a/docs/Models/Components/Transactions.md +++ b/docs/Models/Components/Transactions.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `postedDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2025-01-15T12:00:00.000Z | -| `description` | *?string* | :heavy_minus_sign: | A description of the transaction. | Payment received from ACME Corp | -| `amount` | *float* | :heavy_check_mark: | The amount of the transaction. | 250 | -| `creditOrDebit` | [Components\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` | *?string* | :heavy_minus_sign: | The counterparty of the transaction. | ACME Corp | -| `reference` | *?string* | :heavy_minus_sign: | The reference of the transaction. | INV-2025-01 | -| `transactionType` | [?Components\BankFeedStatementTransactionType](../../Models/Components/BankFeedStatementTransactionType.md) | :heavy_minus_sign: | Type of transaction. | payment | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `postedDate` | [\DateTime](https://www.php.net/manual/en/class.datetime.php) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2025-01-15T12:00:00.000Z | +| `description` | *?string* | :heavy_minus_sign: | A description of the transaction. | Payment received from ACME Corp | +| `amount` | *float* | :heavy_check_mark: | The amount of the transaction. | 250 | +| `creditOrDebit` | [Components\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` | *?string* | :heavy_minus_sign: | The counterparty of the transaction. | ACME Corp | +| `reference` | *?string* | :heavy_minus_sign: | The reference of the transaction. | INV-2025-01 | +| `transactionType` | [?Components\BankFeedStatementTransactionType](../../Models/Components/BankFeedStatementTransactionType.md) | :heavy_minus_sign: | Type of transaction. | payment | +| `merchantCategoryCode` | *?string* | :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 00000000..31cb566a --- /dev/null +++ b/docs/Models/Components/UpdatePaymentMethodResponse.md @@ -0,0 +1,16 @@ +# UpdatePaymentMethodResponse + +Payment Methods + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\UnifiedId](../../Models/Components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | array | :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 00000000..b4717541 --- /dev/null +++ b/docs/Models/Components/UpdateSalesReceiptResponse.md @@ -0,0 +1,16 @@ +# UpdateSalesReceiptResponse + +SalesReceipt updated + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `statusCode` | *int* | :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` | [Components\UnifiedId](../../Models/Components/UnifiedId.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | array | :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 05e0711a..ce7d376f 100644 --- a/docs/Models/Operations/AccountingAttachmentsDownloadRequest.md +++ b/docs/Models/Operations/AccountingAttachmentsDownloadRequest.md @@ -12,4 +12,5 @@ | `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?bool* | :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 f21b6b76..548ac5fc 100644 --- a/docs/Models/Operations/AccountingAttachmentsDownloadResponse.md +++ b/docs/Models/Operations/AccountingAttachmentsDownloadResponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `getAttachmentDownloadResponse` | *?string* | :heavy_minus_sign: | Attachment Download | -| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../Models/Components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getAttachmentDownloadResponse` | *?string* | :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` | [?Components\UnexpectedErrorResponse](../../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 00000000..5d81e1c3 --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsAddRequest.md @@ -0,0 +1,12 @@ +# AccountingPaymentMethodsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | [Components\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 00000000..c5336a2f --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsAddResponse.md @@ -0,0 +1,10 @@ +# AccountingPaymentMethodsAddResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `createPaymentMethodResponse` | [?Components\CreatePaymentMethodResponse](../../Models/Components/CreatePaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..6a0e1b64 --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsAllRequest.md @@ -0,0 +1,15 @@ +# AccountingPaymentMethodsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?string* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *?int* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *?string* | :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` | array | :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 00000000..e22327ca --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsAllResponse.md @@ -0,0 +1,10 @@ +# AccountingPaymentMethodsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getPaymentMethodsResponse` | [?Components\GetPaymentMethodsResponse](../../Models/Components/GetPaymentMethodsResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..12297476 --- /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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?bool* | :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 00000000..393b61d3 --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsDeleteResponse.md @@ -0,0 +1,10 @@ +# AccountingPaymentMethodsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `deletePaymentMethodResponse` | [?Components\DeletePaymentMethodResponse](../../Models/Components/DeletePaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..3c213948 --- /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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *?string* | :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 00000000..9dbba62e --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsOneResponse.md @@ -0,0 +1,10 @@ +# AccountingPaymentMethodsOneResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getPaymentMethodResponse` | [?Components\GetPaymentMethodResponse](../../Models/Components/GetPaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..a7c2b005 --- /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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `accountingPaymentMethod` | [Components\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 00000000..6d59c270 --- /dev/null +++ b/docs/Models/Operations/AccountingPaymentMethodsUpdateResponse.md @@ -0,0 +1,10 @@ +# AccountingPaymentMethodsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `updatePaymentMethodResponse` | [?Components\UpdatePaymentMethodResponse](../../Models/Components/UpdatePaymentMethodResponse.md) | :heavy_minus_sign: | Payment Methods | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..b6442839 --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsAddRequest.md @@ -0,0 +1,13 @@ +# AccountingSalesReceiptsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `raw` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?string* | :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` | [Components\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 00000000..32186a86 --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsAddResponse.md @@ -0,0 +1,10 @@ +# AccountingSalesReceiptsAddResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `createSalesReceiptResponse` | [?Components\CreateSalesReceiptResponse](../../Models/Components/CreateSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt created | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..b6f6aa1a --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsAllRequest.md @@ -0,0 +1,18 @@ +# AccountingSalesReceiptsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *?int* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `filter` | [?Components\SalesReceiptsFilter](../../Models/Components/SalesReceiptsFilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"customer_id": "123abc"
} | +| `sort` | [?Components\SalesReceiptsSort](../../Models/Components/SalesReceiptsSort.md) | :heavy_minus_sign: | Apply sorting | {
"by": "updated_at",
"direction": "desc"
} | +| `passThrough` | array | :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` | *?string* | :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 00000000..6fffb485 --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsAllResponse.md @@ -0,0 +1,10 @@ +# AccountingSalesReceiptsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getSalesReceiptsResponse` | [?Components\GetSalesReceiptsResponse](../../Models/Components/GetSalesReceiptsResponse.md) | :heavy_minus_sign: | SalesReceipts | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..d16ca9f3 --- /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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `companyId` | *?string* | :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 00000000..bfee4ea3 --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsDeleteResponse.md @@ -0,0 +1,10 @@ +# AccountingSalesReceiptsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `deleteSalesReceiptResponse` | [?Components\DeleteSalesReceiptResponse](../../Models/Components/DeleteSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt deleted | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..9965efae --- /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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?string* | :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` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *?string* | :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 00000000..a020f3d0 --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsOneResponse.md @@ -0,0 +1,10 @@ +# AccountingSalesReceiptsOneResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getSalesReceiptResponse` | [?Components\GetSalesReceiptResponse](../../Models/Components/GetSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 00000000..9f84da7a --- /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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *?string* | :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` | *?bool* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `companyId` | *?string* | :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` | [Components\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 00000000..3648b1f7 --- /dev/null +++ b/docs/Models/Operations/AccountingSalesReceiptsUpdateResponse.md @@ -0,0 +1,10 @@ +# AccountingSalesReceiptsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `updateSalesReceiptResponse` | [?Components\UpdateSalesReceiptResponse](../../Models/Components/UpdateSalesReceiptResponse.md) | :heavy_minus_sign: | SalesReceipt updated | +| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../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 868591b1..77ce530f 100644 --- a/docs/Models/Operations/FileStorageFilesDownloadRequest.md +++ b/docs/Models/Operations/FileStorageFilesDownloadRequest.md @@ -9,4 +9,5 @@ | `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | | `appId` | *?string* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?bool* | :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 4456f2e1..d7da0d78 100644 --- a/docs/Models/Operations/FileStorageFilesDownloadResponse.md +++ b/docs/Models/Operations/FileStorageFilesDownloadResponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `getFileDownloadResponse` | *?string* | :heavy_minus_sign: | File Download | -| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../Models/Components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getFileDownloadResponse` | *?string* | :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` | [?Components\UnexpectedErrorResponse](../../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 a4e50a70..fd689b8d 100644 --- a/docs/Models/Operations/FileStorageFilesExportResponse.md +++ b/docs/Models/Operations/FileStorageFilesExportResponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `getFileDownloadResponse` | *?string* | :heavy_minus_sign: | File Download | -| `unexpectedErrorResponse` | [?Components\UnexpectedErrorResponse](../../Models/Components/UnexpectedErrorResponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `getFileDownloadResponse` | *?string* | :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` | [?Components\UnexpectedErrorResponse](../../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 4f94c2c2..1e271ddf 100644 --- a/docs/Models/Operations/ProxyDeleteProxyRequest.md +++ b/docs/Models/Operations/ProxyDeleteProxyRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *?int* | :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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *?bool* | :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 c461061e..b9aee2ef 100644 --- a/docs/Models/Operations/ProxyDeleteProxyResponse.md +++ b/docs/Models/Operations/ProxyDeleteProxyResponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `responseJson` | array | :heavy_minus_sign: | Ok | -| `responseBinary` | *?string* | :heavy_minus_sign: | Ok | -| `responsePdf` | *?string* | :heavy_minus_sign: | Ok | -| `responseXml` | *?string* | :heavy_minus_sign: | Ok | -| `responseCsv` | *?string* | :heavy_minus_sign: | Ok | -| `responseText` | *?string* | :heavy_minus_sign: | Ok | -| `errorJson` | array | :heavy_minus_sign: | Proxy error | -| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | -| `headers` | array> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `responseJson` | array | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | array | :heavy_minus_sign: | Proxy error | +| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | +| `headers` | array> | :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 f87f2007..662c805b 100644 --- a/docs/Models/Operations/ProxyGetProxyRequest.md +++ b/docs/Models/Operations/ProxyGetProxyRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *?int* | :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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *?bool* | :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 a94e6f56..8bafd7ad 100644 --- a/docs/Models/Operations/ProxyGetProxyResponse.md +++ b/docs/Models/Operations/ProxyGetProxyResponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `responseJson` | array | :heavy_minus_sign: | Ok | -| `responseBinary` | *?string* | :heavy_minus_sign: | Ok | -| `responsePdf` | *?string* | :heavy_minus_sign: | Ok | -| `responseXml` | *?string* | :heavy_minus_sign: | Ok | -| `responseCsv` | *?string* | :heavy_minus_sign: | Ok | -| `responseText` | *?string* | :heavy_minus_sign: | Ok | -| `errorJson` | array | :heavy_minus_sign: | Proxy error | -| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | -| `headers` | array> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `responseJson` | array | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | array | :heavy_minus_sign: | Proxy error | +| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | +| `headers` | array> | :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 915e2812..5bef3a41 100644 --- a/docs/Models/Operations/ProxyOptionsProxyRequest.md +++ b/docs/Models/Operations/ProxyOptionsProxyRequest.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *?int* | :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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *?bool* | :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 82a76b3d..a375a1dc 100644 --- a/docs/Models/Operations/ProxyOptionsProxyResponse.md +++ b/docs/Models/Operations/ProxyOptionsProxyResponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `responseJson` | array | :heavy_minus_sign: | Ok | -| `responseBinary` | *?string* | :heavy_minus_sign: | Ok | -| `responsePdf` | *?string* | :heavy_minus_sign: | Ok | -| `responseXml` | *?string* | :heavy_minus_sign: | Ok | -| `responseCsv` | *?string* | :heavy_minus_sign: | Ok | -| `responseText` | *?string* | :heavy_minus_sign: | Ok | -| `errorJson` | array | :heavy_minus_sign: | Proxy error | -| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | -| `headers` | array> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `responseJson` | array | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | array | :heavy_minus_sign: | Proxy error | +| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | +| `headers` | array> | :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 84f58b32..75663b69 100644 --- a/docs/Models/Operations/ProxyPatchProxyRequest.md +++ b/docs/Models/Operations/ProxyPatchProxyRequest.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | -| `requestBody` | *?string* | :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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *?bool* | :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` | *?string* | :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 7cd824f3..ad825582 100644 --- a/docs/Models/Operations/ProxyPatchProxyResponse.md +++ b/docs/Models/Operations/ProxyPatchProxyResponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `responseJson` | array | :heavy_minus_sign: | Ok | -| `responseBinary` | *?string* | :heavy_minus_sign: | Ok | -| `responsePdf` | *?string* | :heavy_minus_sign: | Ok | -| `responseXml` | *?string* | :heavy_minus_sign: | Ok | -| `responseCsv` | *?string* | :heavy_minus_sign: | Ok | -| `responseText` | *?string* | :heavy_minus_sign: | Ok | -| `errorJson` | array | :heavy_minus_sign: | Proxy error | -| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | -| `headers` | array> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `responseJson` | array | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | array | :heavy_minus_sign: | Proxy error | +| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | +| `headers` | array> | :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 d4cefd97..d5336d0c 100644 --- a/docs/Models/Operations/ProxyPostProxyRequest.md +++ b/docs/Models/Operations/ProxyPostProxyRequest.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | -| `requestBody` | *?string* | :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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *?bool* | :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` | *?string* | :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 7e595fac..4428d56a 100644 --- a/docs/Models/Operations/ProxyPostProxyResponse.md +++ b/docs/Models/Operations/ProxyPostProxyResponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `responseJson` | array | :heavy_minus_sign: | Ok | -| `responseBinary` | *?string* | :heavy_minus_sign: | Ok | -| `responsePdf` | *?string* | :heavy_minus_sign: | Ok | -| `responseXml` | *?string* | :heavy_minus_sign: | Ok | -| `responseCsv` | *?string* | :heavy_minus_sign: | Ok | -| `responseText` | *?string* | :heavy_minus_sign: | Ok | -| `errorJson` | array | :heavy_minus_sign: | Proxy error | -| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | -| `headers` | array> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `responseJson` | array | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | array | :heavy_minus_sign: | Proxy error | +| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | +| `headers` | array> | :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 963a6a1c..b3521558 100644 --- a/docs/Models/Operations/ProxyPutProxyRequest.md +++ b/docs/Models/Operations/ProxyPutProxyRequest.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | -| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | -| `requestBody` | *?string* | :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` | *?string* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *?string* | :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` | *?string* | :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` | *?string* | :heavy_minus_sign: | Downstream authorization header. This will skip the Vault token injection. | Bearer | +| `timeout` | *?int* | :heavy_minus_sign: | Override the default downstream request timeout in milliseconds. The default is 28000 (28 seconds). | 30000 | +| `followRedirects` | *?bool* | :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` | *?string* | :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 7fb1a6ca..f9aa7938 100644 --- a/docs/Models/Operations/ProxyPutProxyResponse.md +++ b/docs/Models/Operations/ProxyPutProxyResponse.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | -| `responseJson` | array | :heavy_minus_sign: | Ok | -| `responseBinary` | *?string* | :heavy_minus_sign: | Ok | -| `responsePdf` | *?string* | :heavy_minus_sign: | Ok | -| `responseXml` | *?string* | :heavy_minus_sign: | Ok | -| `responseCsv` | *?string* | :heavy_minus_sign: | Ok | -| `responseText` | *?string* | :heavy_minus_sign: | Ok | -| `errorJson` | array | :heavy_minus_sign: | Proxy error | -| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | -| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | -| `headers` | array> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpMeta` | [Components\HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `responseJson` | array | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | *?string* | :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` | array | :heavy_minus_sign: | Proxy error | +| `errorXml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorHtml` | *?string* | :heavy_minus_sign: | Proxy error | +| `errorText` | *?string* | :heavy_minus_sign: | Proxy error | +| `headers` | array> | :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 ae620bc5..694af43b 100644 --- a/docs/sdks/attachments/README.md +++ b/docs/sdks/attachments/README.md @@ -296,6 +296,7 @@ $request = new Operations\AccountingAttachmentsDownloadRequest( serviceId: 'salesforce', companyId: '12345', fields: 'id,updated_at', + followRedirects: false, ); $response = $sdk->accounting->attachments->download( diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index 7028d619..74048867 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -379,6 +379,7 @@ $request = new Operations\FileStorageFilesDownloadRequest( id: '', serviceId: 'salesforce', fields: 'id,updated_at', + followRedirects: false, ); $response = $sdk->fileStorage->files->download( diff --git a/docs/sdks/paymentmethods/README.md b/docs/sdks/paymentmethods/README.md new file mode 100644 index 00000000..bb163340 --- /dev/null +++ b/docs/sdks/paymentmethods/README.md @@ -0,0 +1,351 @@ +# 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingPaymentMethodsAllRequest( + serviceId: 'salesforce', + fields: 'id,updated_at', + passThrough: [ + 'search' => 'San Francisco', + ], +); + +$responses = $sdk->accounting->paymentMethods->list( + request: $request +); + + +foreach ($responses as $response) { + if ($response->httpMeta->response->getStatusCode() === 200) { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\AccountingPaymentMethodsAllRequest](../../Models/Operations/AccountingPaymentMethodsAllRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingPaymentMethodsAllResponse](../../Models/Operations/AccountingPaymentMethodsAllResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## create + +Create Payment Method + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Components; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingPaymentMethodsAddRequest( + serviceId: 'salesforce', + accountingPaymentMethod: new Components\AccountingPaymentMethodInput( + name: 'Cash', + type: Components\AccountingPaymentMethodType::Cash, + status: Components\AccountingPaymentMethodStatus::Active, + rowVersion: '1-12345', + passThrough: [ + new Components\PassThroughBody( + serviceId: '', + extendPaths: [ + new Components\ExtendPaths( + path: '$.nested.property', + value: [ + 'TaxClassificationRef' => [ + 'value' => 'EUC-99990201-V1-00020000', + ], + ], + ), + ], + ), + ], + ), +); + +$response = $sdk->accounting->paymentMethods->create( + request: $request +); + +if ($response->createPaymentMethodResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\AccountingPaymentMethodsAddRequest](../../Models/Operations/AccountingPaymentMethodsAddRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingPaymentMethodsAddResponse](../../Models/Operations/AccountingPaymentMethodsAddResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## get + +Get Payment Method + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingPaymentMethodsOneRequest( + id: '', + serviceId: 'salesforce', + fields: 'id,updated_at', +); + +$response = $sdk->accounting->paymentMethods->get( + request: $request +); + +if ($response->getPaymentMethodResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\AccountingPaymentMethodsOneRequest](../../Models/Operations/AccountingPaymentMethodsOneRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingPaymentMethodsOneResponse](../../Models/Operations/AccountingPaymentMethodsOneResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## update + +Update Payment Method + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Components; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingPaymentMethodsUpdateRequest( + id: '', + serviceId: 'salesforce', + accountingPaymentMethod: new Components\AccountingPaymentMethodInput( + name: 'Cash', + type: Components\AccountingPaymentMethodType::Cash, + status: Components\AccountingPaymentMethodStatus::Active, + rowVersion: '1-12345', + passThrough: [ + new Components\PassThroughBody( + serviceId: '', + extendPaths: [ + new Components\ExtendPaths( + path: '$.nested.property', + value: [ + 'TaxClassificationRef' => [ + 'value' => 'EUC-99990201-V1-00020000', + ], + ], + ), + ], + ), + ], + ), +); + +$response = $sdk->accounting->paymentMethods->update( + request: $request +); + +if ($response->updatePaymentMethodResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\AccountingPaymentMethodsUpdateRequest](../../Models/Operations/AccountingPaymentMethodsUpdateRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingPaymentMethodsUpdateResponse](../../Models/Operations/AccountingPaymentMethodsUpdateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## delete + +Delete Payment Method + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingPaymentMethodsDeleteRequest( + id: '', + serviceId: 'salesforce', +); + +$response = $sdk->accounting->paymentMethods->delete( + request: $request +); + +if ($response->deletePaymentMethodResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\AccountingPaymentMethodsDeleteRequest](../../Models/Operations/AccountingPaymentMethodsDeleteRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingPaymentMethodsDeleteResponse](../../Models/Operations/AccountingPaymentMethodsDeleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| 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 ee9bb0b2..0eb6607c 100644 --- a/docs/sdks/proxy/README.md +++ b/docs/sdks/proxy/README.md @@ -42,6 +42,7 @@ $request = new Operations\ProxyGetProxyRequest( downstreamUrl: 'https://api.close.com/api/v1/lead', downstreamAuthorization: 'Bearer ', timeout: 30000, + followRedirects: false, ); $response = $sdk->proxy->get( @@ -101,6 +102,7 @@ $request = new Operations\ProxyOptionsProxyRequest( downstreamUrl: 'https://api.close.com/api/v1/lead', downstreamAuthorization: 'Bearer ', timeout: 30000, + followRedirects: false, ); $response = $sdk->proxy->options( @@ -160,6 +162,7 @@ $request = new Operations\ProxyPostProxyRequest( downstreamUrl: 'https://api.close.com/api/v1/lead', downstreamAuthorization: 'Bearer ', timeout: 30000, + followRedirects: false, ); $response = $sdk->proxy->post( @@ -219,6 +222,7 @@ $request = new Operations\ProxyPutProxyRequest( downstreamUrl: 'https://api.close.com/api/v1/lead', downstreamAuthorization: 'Bearer ', timeout: 30000, + followRedirects: false, ); $response = $sdk->proxy->put( @@ -278,6 +282,7 @@ $request = new Operations\ProxyPatchProxyRequest( downstreamUrl: 'https://api.close.com/api/v1/lead', downstreamAuthorization: 'Bearer ', timeout: 30000, + followRedirects: false, ); $response = $sdk->proxy->patch( @@ -337,6 +342,7 @@ $request = new Operations\ProxyDeleteProxyRequest( downstreamUrl: 'https://api.close.com/api/v1/lead', downstreamAuthorization: 'Bearer ', timeout: 30000, + followRedirects: false, ); $response = $sdk->proxy->delete( diff --git a/docs/sdks/salesreceipts/README.md b/docs/sdks/salesreceipts/README.md new file mode 100644 index 00000000..23f3c09f --- /dev/null +++ b/docs/sdks/salesreceipts/README.md @@ -0,0 +1,718 @@ +# 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Components; +use Apideck\Unify\Models\Operations; +use Apideck\Unify\Utils; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingSalesReceiptsAllRequest( + serviceId: 'salesforce', + companyId: '12345', + filter: new Components\SalesReceiptsFilter( + updatedSince: Utils\Utils::parseDateTime('2020-09-30T07:43:32.000Z'), + customerId: '123abc', + ), + sort: new Components\SalesReceiptsSort( + by: Components\SalesReceiptsSortBy::UpdatedAt, + direction: Components\SortDirection::Desc, + ), + passThrough: [ + 'search' => 'San Francisco', + ], + fields: 'id,updated_at', +); + +$responses = $sdk->accounting->salesReceipts->list( + request: $request +); + + +foreach ($responses as $response) { + if ($response->httpMeta->response->getStatusCode() === 200) { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\AccountingSalesReceiptsAllRequest](../../Models/Operations/AccountingSalesReceiptsAllRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingSalesReceiptsAllResponse](../../Models/Operations/AccountingSalesReceiptsAllResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## create + +Create Sales Receipt + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Components; +use Apideck\Unify\Models\Operations; +use Apideck\Unify\Utils; +use Brick\DateTime\LocalDate; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingSalesReceiptsAddRequest( + serviceId: 'salesforce', + companyId: '12345', + salesReceipt: new Components\SalesReceiptInput( + number: 'SR-00001', + customer: new Components\LinkedCustomerInput( + id: '12345', + displayName: 'Windsurf Shop', + email: 'boring@boring.com', + ), + currency: Components\Currency::Usd, + currencyRate: 0.69, + taxInclusive: true, + subTotal: 250, + totalAmount: 49.99, + totalTax: 25, + transactionDate: Utils\Utils::parseDateTime('2021-05-01T12:00:00.000Z'), + paymentMethod: 'cash', + paymentMethodReference: '123456', + paymentMethodId: '12345', + account: new Components\LinkedLedgerAccount( + id: '123456', + name: 'Bank account', + nominalCode: 'N091', + code: '453', + parentId: '123456', + displayId: '123456', + ), + lineItems: [ + new Components\InvoiceLineItemInput( + id: '12345', + rowId: '12345', + code: '120-C', + lineNumber: 1, + description: 'Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.', + type: Components\InvoiceLineItemType::SalesItem, + taxAmount: 27500, + totalAmount: 27500, + quantity: 1, + 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: new Components\LinkedInvoiceItem( + id: '12344', + code: '120-C', + name: 'Model Y', + ), + taxApplicableOn: 'Domestic_Purchase_of_Goods_and_Services', + taxRecoverability: 'Fully_Recoverable', + taxMethod: 'Due_to_Supplier', + worktags: [ + new Components\LinkedWorktag( + id: '123456', + value: 'New York', + ), + ], + taxRate: new Components\LinkedTaxRateInput( + id: '123456', + code: 'N-T', + rate: 10, + ), + trackingCategories: [ + new Components\LinkedTrackingCategory( + id: '123456', + code: '100', + name: 'New York', + parentId: '123456', + parentName: 'New York', + ), + ], + ledgerAccount: new Components\LinkedLedgerAccount( + id: '123456', + name: 'Bank account', + nominalCode: 'N091', + code: '453', + parentId: '123456', + displayId: '123456', + ), + customFields: [ + new Components\CustomField1( + id: '2389328923893298', + name: 'employee_level', + refName: 'Marketing', + description: 'Employee Level', + value: 'Uses Salesforce and Marketo', + ), + ], + rowVersion: '1-12345', + ), + ], + taxCode: '1234', + discountPercentage: 5.5, + discountAmount: 25, + note: 'Thank you for your purchase', + customerMemo: 'Thank you for your business and have a great day!', + reference: 'REF-123456', + billingAddress: new Components\Address( + id: '123', + type: Components\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', + ), + shippingAddress: new Components\Address( + id: '123', + type: Components\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', + ), + department: new Components\LinkedDepartmentInput( + displayId: '123456', + name: 'Acme Inc.', + ), + trackingCategories: [ + new Components\LinkedTrackingCategory( + id: '123456', + code: '100', + name: 'New York', + parentId: '123456', + parentName: 'New York', + ), + ], + customFields: [ + new Components\CustomField1( + id: '2389328923893298', + name: 'employee_level', + refName: 'Marketing', + description: 'Employee Level', + value: 'Uses Salesforce and Marketo', + ), + ], + rowVersion: '1-12345', + passThrough: [ + new Components\PassThroughBody( + serviceId: '', + extendPaths: [ + new Components\ExtendPaths( + path: '$.nested.property', + value: [ + 'TaxClassificationRef' => [ + 'value' => 'EUC-99990201-V1-00020000', + ], + ], + ), + ], + ), + ], + ), +); + +$response = $sdk->accounting->salesReceipts->create( + request: $request +); + +if ($response->createSalesReceiptResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\AccountingSalesReceiptsAddRequest](../../Models/Operations/AccountingSalesReceiptsAddRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingSalesReceiptsAddResponse](../../Models/Operations/AccountingSalesReceiptsAddResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## get + +Get Sales Receipt + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingSalesReceiptsOneRequest( + id: '', + serviceId: 'salesforce', + companyId: '12345', + fields: 'id,updated_at', +); + +$response = $sdk->accounting->salesReceipts->get( + request: $request +); + +if ($response->getSalesReceiptResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\AccountingSalesReceiptsOneRequest](../../Models/Operations/AccountingSalesReceiptsOneRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingSalesReceiptsOneResponse](../../Models/Operations/AccountingSalesReceiptsOneResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## update + +Update Sales Receipt + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Components; +use Apideck\Unify\Models\Operations; +use Apideck\Unify\Utils; +use Brick\DateTime\LocalDate; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingSalesReceiptsUpdateRequest( + id: '', + serviceId: 'salesforce', + companyId: '12345', + salesReceipt: new Components\SalesReceiptInput( + number: 'SR-00001', + customer: new Components\LinkedCustomerInput( + id: '12345', + displayName: 'Windsurf Shop', + email: 'boring@boring.com', + ), + currency: Components\Currency::Usd, + currencyRate: 0.69, + taxInclusive: true, + subTotal: 250, + totalAmount: 49.99, + totalTax: 25, + transactionDate: Utils\Utils::parseDateTime('2021-05-01T12:00:00.000Z'), + paymentMethod: 'cash', + paymentMethodReference: '123456', + paymentMethodId: '12345', + account: new Components\LinkedLedgerAccount( + id: '123456', + name: 'Bank account', + nominalCode: 'N091', + code: '453', + parentId: '123456', + displayId: '123456', + ), + lineItems: [ + new Components\InvoiceLineItemInput( + id: '12345', + rowId: '12345', + code: '120-C', + lineNumber: 1, + description: 'Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.', + type: Components\InvoiceLineItemType::SalesItem, + taxAmount: 27500, + totalAmount: 27500, + quantity: 1, + 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: new Components\LinkedInvoiceItem( + id: '12344', + code: '120-C', + name: 'Model Y', + ), + taxApplicableOn: 'Domestic_Purchase_of_Goods_and_Services', + taxRecoverability: 'Fully_Recoverable', + taxMethod: 'Due_to_Supplier', + worktags: [ + new Components\LinkedWorktag( + id: '123456', + value: 'New York', + ), + ], + taxRate: new Components\LinkedTaxRateInput( + id: '123456', + code: 'N-T', + rate: 10, + ), + trackingCategories: [ + new Components\LinkedTrackingCategory( + id: '123456', + code: '100', + name: 'New York', + parentId: '123456', + parentName: 'New York', + ), + ], + ledgerAccount: new Components\LinkedLedgerAccount( + id: '123456', + name: 'Bank account', + nominalCode: 'N091', + code: '453', + parentId: '123456', + displayId: '123456', + ), + customFields: [ + new Components\CustomField1( + id: '2389328923893298', + name: 'employee_level', + refName: 'Marketing', + description: 'Employee Level', + value: 'Uses Salesforce and Marketo', + ), + ], + rowVersion: '1-12345', + ), + ], + taxCode: '1234', + discountPercentage: 5.5, + discountAmount: 25, + note: 'Thank you for your purchase', + customerMemo: 'Thank you for your business and have a great day!', + reference: 'REF-123456', + billingAddress: new Components\Address( + id: '123', + type: Components\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', + ), + shippingAddress: new Components\Address( + id: '123', + type: Components\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', + ), + department: new Components\LinkedDepartmentInput( + displayId: '123456', + name: 'Acme Inc.', + ), + trackingCategories: [ + new Components\LinkedTrackingCategory( + id: '123456', + code: '100', + name: 'New York', + parentId: '123456', + parentName: 'New York', + ), + ], + customFields: [ + new Components\CustomField1( + id: '2389328923893298', + name: 'employee_level', + refName: 'Marketing', + description: 'Employee Level', + value: 'Uses Salesforce and Marketo', + ), + ], + rowVersion: '1-12345', + passThrough: [ + new Components\PassThroughBody( + serviceId: '', + extendPaths: [ + new Components\ExtendPaths( + path: '$.nested.property', + value: [ + 'TaxClassificationRef' => [ + 'value' => 'EUC-99990201-V1-00020000', + ], + ], + ), + ], + ), + ], + ), +); + +$response = $sdk->accounting->salesReceipts->update( + request: $request +); + +if ($response->updateSalesReceiptResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\AccountingSalesReceiptsUpdateRequest](../../Models/Operations/AccountingSalesReceiptsUpdateRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingSalesReceiptsUpdateResponse](../../Models/Operations/AccountingSalesReceiptsUpdateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## delete + +Delete Sales Receipt + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Apideck\Unify; +use Apideck\Unify\Models\Operations; + +$sdk = Unify\Apideck::builder() + ->setConsumerId('test-consumer') + ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX') + ->setSecurity( + '' + ) + ->build(); + +$request = new Operations\AccountingSalesReceiptsDeleteRequest( + id: '', + serviceId: 'salesforce', + companyId: '12345', +); + +$response = $sdk->accounting->salesReceipts->delete( + request: $request +); + +if ($response->deleteSalesReceiptResponse !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\AccountingSalesReceiptsDeleteRequest](../../Models/Operations/AccountingSalesReceiptsDeleteRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\AccountingSalesReceiptsDeleteResponse](../../Models/Operations/AccountingSalesReceiptsDeleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequestResponse | 400 | application/json | +| Errors\UnauthorizedResponse | 401 | application/json | +| Errors\PaymentRequiredResponse | 402 | application/json | +| Errors\NotFoundResponse | 404 | application/json | +| Errors\UnprocessableResponse | 422 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/src/Accounting.php b/src/Accounting.php index a134df9b..4ab72a01 100644 --- a/src/Accounting.php +++ b/src/Accounting.php @@ -45,6 +45,8 @@ class Accounting public GeneralLedgerTransactions $generalLedgerTransactions; + public SalesReceipts $salesReceipts; + public PurchaseOrders $purchaseOrders; public Subsidiaries $subsidiaries; @@ -81,6 +83,8 @@ class Accounting public ExpenseCategories $expenseCategories; + public PaymentMethods $paymentMethods; + public ExpenseReports $expenseReports; /** @@ -105,6 +109,7 @@ public function __construct(public SDKConfiguration $sdkConfig) $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); @@ -123,6 +128,7 @@ public function __construct(public SDKConfiguration $sdkConfig) $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); } /** diff --git a/src/Models/Components/AccountingPaymentMethod.php b/src/Models/Components/AccountingPaymentMethod.php new file mode 100644 index 00000000..fa4230f6 --- /dev/null +++ b/src/Models/Components/AccountingPaymentMethod.php @@ -0,0 +1,156 @@ + $passThrough + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('pass_through')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\PassThroughBody>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $passThrough = null; + + /** + * The type of payment method. + * + * @var ?\Apideck\Unify\Models\Components\AccountingPaymentMethodType $type + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('type')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\AccountingPaymentMethodType|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?AccountingPaymentMethodType $type = null; + + /** + * The status of the payment method. + * + * @var ?\Apideck\Unify\Models\Components\AccountingPaymentMethodStatus $status + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('status')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\AccountingPaymentMethodStatus|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?AccountingPaymentMethodStatus $status = null; + + /** + * When custom mappings are configured on the resource, the result is included here. + * + * @var ?array $customMappings + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('custom_mappings')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $customMappings = null; + + /** + * The third-party API ID of original entity + * + * @var ?string $downstreamId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('downstream_id')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $downstreamId = null; + + /** + * 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. + * + * @var ?string $rowVersion + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('row_version')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $rowVersion = null; + + /** + * The user who last updated the object. + * + * @var ?string $updatedBy + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updated_by')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $updatedBy = null; + + /** + * The user who created the object. + * + * @var ?string $createdBy + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_by')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $createdBy = null; + + /** + * The date and time when the object was last updated. + * + * @var ?\DateTime $updatedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updated_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?\DateTime $updatedAt = null; + + /** + * The date and time when the object was created. + * + * @var ?\DateTime $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?\DateTime $createdAt = null; + + /** + * @param ?string $id + * @param ?string $name + * @param ?array<\Apideck\Unify\Models\Components\PassThroughBody> $passThrough + * @param ?\Apideck\Unify\Models\Components\AccountingPaymentMethodType $type + * @param ?\Apideck\Unify\Models\Components\AccountingPaymentMethodStatus $status + * @param ?array $customMappings + * @param ?string $downstreamId + * @param ?string $rowVersion + * @param ?string $updatedBy + * @param ?string $createdBy + * @param ?\DateTime $updatedAt + * @param ?\DateTime $createdAt + * @phpstan-pure + */ + public function __construct(?string $id = null, ?string $name = null, ?array $passThrough = null, ?AccountingPaymentMethodType $type = null, ?AccountingPaymentMethodStatus $status = null, ?array $customMappings = null, ?string $downstreamId = null, ?string $rowVersion = null, ?string $updatedBy = null, ?string $createdBy = null, ?\DateTime $updatedAt = null, ?\DateTime $createdAt = null) + { + $this->id = $id; + $this->name = $name; + $this->passThrough = $passThrough; + $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; + } +} \ No newline at end of file diff --git a/src/Models/Components/AccountingPaymentMethodInput.php b/src/Models/Components/AccountingPaymentMethodInput.php new file mode 100644 index 00000000..2a9aa882 --- /dev/null +++ b/src/Models/Components/AccountingPaymentMethodInput.php @@ -0,0 +1,78 @@ + $passThrough + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('pass_through')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\PassThroughBody>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $passThrough = null; + + /** + * The type of payment method. + * + * @var ?\Apideck\Unify\Models\Components\AccountingPaymentMethodType $type + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('type')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\AccountingPaymentMethodType|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?AccountingPaymentMethodType $type = null; + + /** + * The status of the payment method. + * + * @var ?\Apideck\Unify\Models\Components\AccountingPaymentMethodStatus $status + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('status')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\AccountingPaymentMethodStatus|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?AccountingPaymentMethodStatus $status = null; + + /** + * 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. + * + * @var ?string $rowVersion + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('row_version')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $rowVersion = null; + + /** + * @param ?string $name + * @param ?array<\Apideck\Unify\Models\Components\PassThroughBody> $passThrough + * @param ?\Apideck\Unify\Models\Components\AccountingPaymentMethodType $type + * @param ?\Apideck\Unify\Models\Components\AccountingPaymentMethodStatus $status + * @param ?string $rowVersion + * @phpstan-pure + */ + public function __construct(?string $name = null, ?array $passThrough = null, ?AccountingPaymentMethodType $type = null, ?AccountingPaymentMethodStatus $status = null, ?string $rowVersion = null) + { + $this->name = $name; + $this->passThrough = $passThrough; + $this->type = $type; + $this->status = $status; + $this->rowVersion = $rowVersion; + } +} \ No newline at end of file diff --git a/src/Models/Components/AccountingPaymentMethodStatus.php b/src/Models/Components/AccountingPaymentMethodStatus.php new file mode 100644 index 00000000..83447573 --- /dev/null +++ b/src/Models/Components/AccountingPaymentMethodStatus.php @@ -0,0 +1,17 @@ +id = $id; $this->reference = $reference; @@ -155,6 +165,7 @@ public function __construct(?string $id = null, ?AttachmentReference $reference $this->mimeType = $mimeType; $this->size = $size; $this->description = $description; + $this->fileUrl = $fileUrl; $this->parentFolderId = $parentFolderId; $this->updatedBy = $updatedBy; $this->createdBy = $createdBy; diff --git a/src/Models/Components/BankFeedAccount.php b/src/Models/Components/BankFeedAccount.php index f5176c94..27b4d00f 100644 --- a/src/Models/Components/BankFeedAccount.php +++ b/src/Models/Components/BankFeedAccount.php @@ -85,6 +85,42 @@ class BankFeedAccount #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?array $customFields = null; + /** + * Bank routing number (US) + * + * @var ?string $sourceRoutingNumber + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('source_routing_number')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $sourceRoutingNumber = null; + + /** + * The bank account number + * + * @var ?string $sourceAccountNumber + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('source_account_number')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $sourceAccountNumber = null; + + /** + * The current balance of the source bank account. + * + * @var ?float $balance + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('balance')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $balance = null; + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + * + * @var ?float $availableBalance + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('available_balance')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $availableBalance = null; + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * @@ -159,6 +195,10 @@ class BankFeedAccount * @param ?string $targetAccountNumber * @param ?\Apideck\Unify\Models\Components\FeedStatus $feedStatus * @param ?array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2> $customFields + * @param ?string $sourceRoutingNumber + * @param ?string $sourceAccountNumber + * @param ?float $balance + * @param ?float $availableBalance * @param ?\Apideck\Unify\Models\Components\Currency $currency * @param ?string $country * @param ?array $customMappings @@ -168,7 +208,7 @@ class BankFeedAccount * @param ?string $createdBy * @phpstan-pure */ - public function __construct(string $id, ?BankAccountType $bankAccountType = null, ?string $sourceAccountId = null, ?string $targetAccountId = null, ?string $targetAccountName = null, ?string $targetAccountNumber = null, ?FeedStatus $feedStatus = null, ?array $customFields = null, ?Currency $currency = null, ?string $country = null, ?array $customMappings = null, ?\DateTime $createdAt = null, ?\DateTime $updatedAt = null, ?string $updatedBy = null, ?string $createdBy = null) + public function __construct(string $id, ?BankAccountType $bankAccountType = null, ?string $sourceAccountId = null, ?string $targetAccountId = null, ?string $targetAccountName = null, ?string $targetAccountNumber = null, ?FeedStatus $feedStatus = null, ?array $customFields = null, ?string $sourceRoutingNumber = null, ?string $sourceAccountNumber = null, ?float $balance = null, ?float $availableBalance = null, ?Currency $currency = null, ?string $country = null, ?array $customMappings = null, ?\DateTime $createdAt = null, ?\DateTime $updatedAt = null, ?string $updatedBy = null, ?string $createdBy = null) { $this->id = $id; $this->bankAccountType = $bankAccountType; @@ -178,6 +218,10 @@ public function __construct(string $id, ?BankAccountType $bankAccountType = null $this->targetAccountNumber = $targetAccountNumber; $this->feedStatus = $feedStatus; $this->customFields = $customFields; + $this->sourceRoutingNumber = $sourceRoutingNumber; + $this->sourceAccountNumber = $sourceAccountNumber; + $this->balance = $balance; + $this->availableBalance = $availableBalance; $this->currency = $currency; $this->country = $country; $this->customMappings = $customMappings; diff --git a/src/Models/Components/BankFeedAccountInput.php b/src/Models/Components/BankFeedAccountInput.php index 0e6d7338..ab988faf 100644 --- a/src/Models/Components/BankFeedAccountInput.php +++ b/src/Models/Components/BankFeedAccountInput.php @@ -77,6 +77,42 @@ class BankFeedAccountInput #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?array $customFields = null; + /** + * Bank routing number (US) + * + * @var ?string $sourceRoutingNumber + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('source_routing_number')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $sourceRoutingNumber = null; + + /** + * The bank account number + * + * @var ?string $sourceAccountNumber + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('source_account_number')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $sourceAccountNumber = null; + + /** + * The current balance of the source bank account. + * + * @var ?float $balance + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('balance')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $balance = null; + + /** + * The available balance of the source bank account (considering pending transactions and overdraft). + * + * @var ?float $availableBalance + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('available_balance')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $availableBalance = null; + /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * @@ -104,11 +140,15 @@ class BankFeedAccountInput * @param ?string $targetAccountNumber * @param ?\Apideck\Unify\Models\Components\FeedStatus $feedStatus * @param ?array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2> $customFields + * @param ?string $sourceRoutingNumber + * @param ?string $sourceAccountNumber + * @param ?float $balance + * @param ?float $availableBalance * @param ?\Apideck\Unify\Models\Components\Currency $currency * @param ?string $country * @phpstan-pure */ - public function __construct(?BankAccountType $bankAccountType = null, ?string $sourceAccountId = null, ?string $targetAccountId = null, ?string $targetAccountName = null, ?string $targetAccountNumber = null, ?FeedStatus $feedStatus = null, ?array $customFields = null, ?Currency $currency = null, ?string $country = null) + public function __construct(?BankAccountType $bankAccountType = null, ?string $sourceAccountId = null, ?string $targetAccountId = null, ?string $targetAccountName = null, ?string $targetAccountNumber = null, ?FeedStatus $feedStatus = null, ?array $customFields = null, ?string $sourceRoutingNumber = null, ?string $sourceAccountNumber = null, ?float $balance = null, ?float $availableBalance = null, ?Currency $currency = null, ?string $country = null) { $this->bankAccountType = $bankAccountType; $this->sourceAccountId = $sourceAccountId; @@ -117,6 +157,10 @@ public function __construct(?BankAccountType $bankAccountType = null, ?string $s $this->targetAccountNumber = $targetAccountNumber; $this->feedStatus = $feedStatus; $this->customFields = $customFields; + $this->sourceRoutingNumber = $sourceRoutingNumber; + $this->sourceAccountNumber = $sourceAccountNumber; + $this->balance = $balance; + $this->availableBalance = $availableBalance; $this->currency = $currency; $this->country = $country; } diff --git a/src/Models/Components/CreatePaymentMethodResponse.php b/src/Models/Components/CreatePaymentMethodResponse.php new file mode 100644 index 00000000..53e0b7e5 --- /dev/null +++ b/src/Models/Components/CreatePaymentMethodResponse.php @@ -0,0 +1,94 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\UnifiedId $data + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, UnifiedId $data, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/CreateSalesReceiptResponse.php b/src/Models/Components/CreateSalesReceiptResponse.php new file mode 100644 index 00000000..8959c239 --- /dev/null +++ b/src/Models/Components/CreateSalesReceiptResponse.php @@ -0,0 +1,94 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\UnifiedId $data + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, UnifiedId $data, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/CustomField1.php b/src/Models/Components/CustomField1.php index 3f3d6a3f..9f8c0422 100644 --- a/src/Models/Components/CustomField1.php +++ b/src/Models/Components/CustomField1.php @@ -28,6 +28,15 @@ class CustomField1 #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $name = null; + /** + * 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. + * + * @var ?string $refName + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('ref_name')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $refName = null; + /** * More information about the custom field * @@ -49,14 +58,16 @@ class CustomField1 /** * @param ?string $id * @param ?string $name + * @param ?string $refName * @param ?string $description * @param string|float|bool|array|array|null>|null $value * @phpstan-pure */ - public function __construct(?string $id = null, ?string $name = null, ?string $description = null, string|float|bool|array|null $value = null) + public function __construct(?string $id = null, ?string $name = null, ?string $refName = null, ?string $description = null, string|float|bool|array|null $value = null) { $this->id = $id; $this->name = $name; + $this->refName = $refName; $this->description = $description; $this->value = $value; } diff --git a/src/Models/Components/CustomField2.php b/src/Models/Components/CustomField2.php index 43576174..1bd1468c 100644 --- a/src/Models/Components/CustomField2.php +++ b/src/Models/Components/CustomField2.php @@ -28,6 +28,15 @@ class CustomField2 #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $id = null; + /** + * 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. + * + * @var ?string $refName + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('ref_name')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $refName = null; + /** * More information about the custom field * @@ -49,14 +58,16 @@ class CustomField2 /** * @param ?string $name * @param ?string $id + * @param ?string $refName * @param ?string $description * @param string|float|bool|array|array|null>|null $value * @phpstan-pure */ - public function __construct(?string $name = null, ?string $id = null, ?string $description = null, string|float|bool|array|null $value = null) + public function __construct(?string $name = null, ?string $id = null, ?string $refName = null, ?string $description = null, string|float|bool|array|null $value = null) { $this->name = $name; $this->id = $id; + $this->refName = $refName; $this->description = $description; $this->value = $value; } diff --git a/src/Models/Components/DeletePaymentMethodResponse.php b/src/Models/Components/DeletePaymentMethodResponse.php new file mode 100644 index 00000000..a545c482 --- /dev/null +++ b/src/Models/Components/DeletePaymentMethodResponse.php @@ -0,0 +1,94 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\UnifiedId $data + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, UnifiedId $data, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/DeleteSalesReceiptResponse.php b/src/Models/Components/DeleteSalesReceiptResponse.php new file mode 100644 index 00000000..54877481 --- /dev/null +++ b/src/Models/Components/DeleteSalesReceiptResponse.php @@ -0,0 +1,94 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\UnifiedId $data + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, UnifiedId $data, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/GetPaymentMethodResponse.php b/src/Models/Components/GetPaymentMethodResponse.php new file mode 100644 index 00000000..1688a3d4 --- /dev/null +++ b/src/Models/Components/GetPaymentMethodResponse.php @@ -0,0 +1,105 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\AccountingPaymentMethod $data + * @param ?\Apideck\Unify\Models\Components\Meta $meta + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, AccountingPaymentMethod $data, ?Meta $meta = null, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->meta = $meta; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/GetPaymentMethodsResponse.php b/src/Models/Components/GetPaymentMethodsResponse.php new file mode 100644 index 00000000..01557d96 --- /dev/null +++ b/src/Models/Components/GetPaymentMethodsResponse.php @@ -0,0 +1,118 @@ + $data + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('data')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\AccountingPaymentMethod>')] + public array $data; + + /** + * Response metadata + * + * @var ?\Apideck\Unify\Models\Components\Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * Links to navigate to previous or next pages through the API + * + * @var ?\Apideck\Unify\Models\Components\Links $links + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('links')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Links|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Links $links = null; + + /** + * Raw response from the integration when raw=true query param is provided + * + * @var ?array $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param array<\Apideck\Unify\Models\Components\AccountingPaymentMethod> $data + * @param ?\Apideck\Unify\Models\Components\Meta $meta + * @param ?\Apideck\Unify\Models\Components\Links $links + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, array $data, ?Meta $meta = null, ?Links $links = null, ?array $raw = null) + { + $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; + } +} \ No newline at end of file diff --git a/src/Models/Components/GetSalesReceiptResponse.php b/src/Models/Components/GetSalesReceiptResponse.php new file mode 100644 index 00000000..76a47b7a --- /dev/null +++ b/src/Models/Components/GetSalesReceiptResponse.php @@ -0,0 +1,105 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\SalesReceipt $data + * @param ?\Apideck\Unify\Models\Components\Meta $meta + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, SalesReceipt $data, ?Meta $meta = null, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->meta = $meta; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/GetSalesReceiptsResponse.php b/src/Models/Components/GetSalesReceiptsResponse.php new file mode 100644 index 00000000..3a0d3830 --- /dev/null +++ b/src/Models/Components/GetSalesReceiptsResponse.php @@ -0,0 +1,118 @@ + $data + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('data')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\SalesReceipt>')] + public array $data; + + /** + * Response metadata + * + * @var ?\Apideck\Unify\Models\Components\Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * Links to navigate to previous or next pages through the API + * + * @var ?\Apideck\Unify\Models\Components\Links $links + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('links')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Links|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Links $links = null; + + /** + * Raw response from the integration when raw=true query param is provided + * + * @var ?array $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param array<\Apideck\Unify\Models\Components\SalesReceipt> $data + * @param ?\Apideck\Unify\Models\Components\Meta $meta + * @param ?\Apideck\Unify\Models\Components\Links $links + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, array $data, ?Meta $meta = null, ?Links $links = null, ?array $raw = null) + { + $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; + } +} \ No newline at end of file diff --git a/src/Models/Components/Refund.php b/src/Models/Components/Refund.php index f7404fb6..de2898a8 100644 --- a/src/Models/Components/Refund.php +++ b/src/Models/Components/Refund.php @@ -38,7 +38,7 @@ class Refund public ?RefundStatus $status = null; /** - * 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. * * @var ?\Apideck\Unify\Models\Components\RefundType $type */ @@ -48,7 +48,7 @@ class Refund public ?RefundType $type = null; /** - * 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. + * 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. * * @var ?array<\Apideck\Unify\Models\Components\InvoiceLineItem> $lineItems */ diff --git a/src/Models/Components/RefundInput.php b/src/Models/Components/RefundInput.php index 48489a82..74ab9b6b 100644 --- a/src/Models/Components/RefundInput.php +++ b/src/Models/Components/RefundInput.php @@ -30,7 +30,7 @@ class RefundInput public ?RefundStatus $status = null; /** - * 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. * * @var ?\Apideck\Unify\Models\Components\RefundType $type */ @@ -40,7 +40,7 @@ class RefundInput public ?RefundType $type = null; /** - * 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. + * 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. * * @var ?array<\Apideck\Unify\Models\Components\InvoiceLineItemInput> $lineItems */ diff --git a/src/Models/Components/RefundType.php b/src/Models/Components/RefundType.php index d4e3c8ed..c5a6ca36 100644 --- a/src/Models/Components/RefundType.php +++ b/src/Models/Components/RefundType.php @@ -9,10 +9,11 @@ namespace Apideck\Unify\Models\Components; -/** 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. */ enum RefundType: string { case RefundReceipt = 'refund_receipt'; case CashRefund = 'cash_refund'; case CreditNoteRefund = 'credit_note_refund'; + case SaleRefund = 'sale_refund'; } diff --git a/src/Models/Components/SalesReceipt.php b/src/Models/Components/SalesReceipt.php new file mode 100644 index 00000000..20f70136 --- /dev/null +++ b/src/Models/Components/SalesReceipt.php @@ -0,0 +1,388 @@ + $lineItems + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('line_items')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\InvoiceLineItem>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $lineItems = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\Address $billingAddress + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('billing_address')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Address|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Address $billingAddress = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\Address $shippingAddress + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('shipping_address')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Address|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Address $shippingAddress = null; + + /** + * $customFields + * + * @var ?array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2> $customFields + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('custom_fields')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $customFields = null; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + * + * @var ?array<\Apideck\Unify\Models\Components\PassThroughBody> $passThrough + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('pass_through')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\PassThroughBody>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $passThrough = null; + + /** + * Reference number for the sales receipt. + * + * @var ?string $number + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('number')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $number = null; + + /** + * The customer this entity is linked to. + * + * @var ?\Apideck\Unify\Models\Components\LinkedCustomer $customer + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('customer')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\LinkedCustomer|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LinkedCustomer $customer = null; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * + * @var ?\Apideck\Unify\Models\Components\Currency $currency + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('currency')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Currency|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Currency $currency = null; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + * + * @var ?float $currencyRate + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('currency_rate')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $currencyRate = null; + + /** + * Amounts are including tax + * + * @var ?bool $taxInclusive + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tax_inclusive')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $taxInclusive = null; + + /** + * Subtotal amount, normally before tax. + * + * @var ?float $subTotal + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('sub_total')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $subTotal = null; + + /** + * Total tax amount applied to this transaction. + * + * @var ?float $totalTax + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('total_tax')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $totalTax = null; + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + * + * @var ?\DateTime $transactionDate + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('transaction_date')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?\DateTime $transactionDate = null; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + * + * @var ?string $paymentMethod + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('payment_method')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $paymentMethod = null; + + /** + * Optional reference message returned by payment method on processing + * + * @var ?string $paymentMethodReference + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('payment_method_reference')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $paymentMethodReference = null; + + /** + * A unique identifier for an object. + * + * @var ?string $paymentMethodId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('payment_method_id')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $paymentMethodId = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\LinkedLedgerAccount $account + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('account')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\LinkedLedgerAccount|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LinkedLedgerAccount $account = null; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + * + * @var ?string $taxCode + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tax_code')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $taxCode = null; + + /** + * Discount percentage applied to this sales receipt. + * + * @var ?float $discountPercentage + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('discount_percentage')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $discountPercentage = null; + + /** + * Discount amount applied to this sales receipt. + * + * @var ?float $discountAmount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('discount_amount')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $discountAmount = null; + + /** + * Optional note to be associated with the sales receipt. + * + * @var ?string $note + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('note')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $note = null; + + /** + * Customer memo + * + * @var ?string $customerMemo + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('customer_memo')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $customerMemo = null; + + /** + * Optional reference message for the sales receipt. + * + * @var ?string $reference + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('reference')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $reference = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\LinkedDepartment $department + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('department')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\LinkedDepartment|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LinkedDepartment $department = null; + + /** + * A list of linked tracking categories. + * + * @var ?array $trackingCategories + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tracking_categories')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\LinkedTrackingCategory|null>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $trackingCategories = null; + + /** + * When custom mappings are configured on the resource, the result is included here. + * + * @var ?array $customMappings + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('custom_mappings')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $customMappings = null; + + /** + * 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. + * + * @var ?string $rowVersion + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('row_version')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $rowVersion = null; + + /** + * The user who last updated the object. + * + * @var ?string $updatedBy + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updated_by')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $updatedBy = null; + + /** + * The user who created the object. + * + * @var ?string $createdBy + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_by')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $createdBy = null; + + /** + * The date and time when the object was last updated. + * + * @var ?\DateTime $updatedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updated_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?\DateTime $updatedAt = null; + + /** + * The date and time when the object was created. + * + * @var ?\DateTime $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?\DateTime $createdAt = null; + + /** + * @param string $id + * @param ?float $totalAmount + * @param ?array<\Apideck\Unify\Models\Components\InvoiceLineItem> $lineItems + * @param ?\Apideck\Unify\Models\Components\Address $billingAddress + * @param ?\Apideck\Unify\Models\Components\Address $shippingAddress + * @param ?array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2> $customFields + * @param ?array<\Apideck\Unify\Models\Components\PassThroughBody> $passThrough + * @param ?string $number + * @param ?\Apideck\Unify\Models\Components\LinkedCustomer $customer + * @param ?\Apideck\Unify\Models\Components\Currency $currency + * @param ?float $currencyRate + * @param ?bool $taxInclusive + * @param ?float $subTotal + * @param ?float $totalTax + * @param ?\DateTime $transactionDate + * @param ?string $paymentMethod + * @param ?string $paymentMethodReference + * @param ?string $paymentMethodId + * @param ?\Apideck\Unify\Models\Components\LinkedLedgerAccount $account + * @param ?string $taxCode + * @param ?float $discountPercentage + * @param ?float $discountAmount + * @param ?string $note + * @param ?string $customerMemo + * @param ?string $reference + * @param ?\Apideck\Unify\Models\Components\LinkedDepartment $department + * @param ?array $trackingCategories + * @param ?array $customMappings + * @param ?string $rowVersion + * @param ?string $updatedBy + * @param ?string $createdBy + * @param ?\DateTime $updatedAt + * @param ?\DateTime $createdAt + * @phpstan-pure + */ + public function __construct(string $id, ?float $totalAmount = null, ?array $lineItems = null, ?Address $billingAddress = null, ?Address $shippingAddress = null, ?array $customFields = null, ?array $passThrough = null, ?string $number = null, ?LinkedCustomer $customer = null, ?Currency $currency = null, ?float $currencyRate = null, ?bool $taxInclusive = null, ?float $subTotal = null, ?float $totalTax = null, ?\DateTime $transactionDate = null, ?string $paymentMethod = null, ?string $paymentMethodReference = null, ?string $paymentMethodId = null, ?LinkedLedgerAccount $account = null, ?string $taxCode = null, ?float $discountPercentage = null, ?float $discountAmount = null, ?string $note = null, ?string $customerMemo = null, ?string $reference = null, ?LinkedDepartment $department = null, ?array $trackingCategories = null, ?array $customMappings = null, ?string $rowVersion = null, ?string $updatedBy = null, ?string $createdBy = null, ?\DateTime $updatedAt = null, ?\DateTime $createdAt = null) + { + $this->id = $id; + $this->totalAmount = $totalAmount; + $this->lineItems = $lineItems; + $this->billingAddress = $billingAddress; + $this->shippingAddress = $shippingAddress; + $this->customFields = $customFields; + $this->passThrough = $passThrough; + $this->number = $number; + $this->customer = $customer; + $this->currency = $currency; + $this->currencyRate = $currencyRate; + $this->taxInclusive = $taxInclusive; + $this->subTotal = $subTotal; + $this->totalTax = $totalTax; + $this->transactionDate = $transactionDate; + $this->paymentMethod = $paymentMethod; + $this->paymentMethodReference = $paymentMethodReference; + $this->paymentMethodId = $paymentMethodId; + $this->account = $account; + $this->taxCode = $taxCode; + $this->discountPercentage = $discountPercentage; + $this->discountAmount = $discountAmount; + $this->note = $note; + $this->customerMemo = $customerMemo; + $this->reference = $reference; + $this->department = $department; + $this->trackingCategories = $trackingCategories; + $this->customMappings = $customMappings; + $this->rowVersion = $rowVersion; + $this->updatedBy = $updatedBy; + $this->createdBy = $createdBy; + $this->updatedAt = $updatedAt; + $this->createdAt = $createdAt; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesReceiptInput.php b/src/Models/Components/SalesReceiptInput.php new file mode 100644 index 00000000..f73dbe48 --- /dev/null +++ b/src/Models/Components/SalesReceiptInput.php @@ -0,0 +1,322 @@ + $lineItems + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('line_items')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\InvoiceLineItemInput>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $lineItems = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\Address $billingAddress + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('billing_address')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Address|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Address $billingAddress = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\Address $shippingAddress + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('shipping_address')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Address|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Address $shippingAddress = null; + + /** + * $customFields + * + * @var ?array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2> $customFields + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('custom_fields')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $customFields = null; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + * + * @var ?array<\Apideck\Unify\Models\Components\PassThroughBody> $passThrough + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('pass_through')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\PassThroughBody>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $passThrough = null; + + /** + * Reference number for the sales receipt. + * + * @var ?string $number + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('number')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $number = null; + + /** + * The customer this entity is linked to. + * + * @var ?\Apideck\Unify\Models\Components\LinkedCustomerInput $customer + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('customer')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\LinkedCustomerInput|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LinkedCustomerInput $customer = null; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * + * @var ?\Apideck\Unify\Models\Components\Currency $currency + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('currency')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\Currency|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Currency $currency = null; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + * + * @var ?float $currencyRate + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('currency_rate')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $currencyRate = null; + + /** + * Amounts are including tax + * + * @var ?bool $taxInclusive + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tax_inclusive')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $taxInclusive = null; + + /** + * Subtotal amount, normally before tax. + * + * @var ?float $subTotal + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('sub_total')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $subTotal = null; + + /** + * Total tax amount applied to this transaction. + * + * @var ?float $totalTax + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('total_tax')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $totalTax = null; + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + * + * @var ?\DateTime $transactionDate + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('transaction_date')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?\DateTime $transactionDate = null; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + * + * @var ?string $paymentMethod + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('payment_method')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $paymentMethod = null; + + /** + * Optional reference message returned by payment method on processing + * + * @var ?string $paymentMethodReference + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('payment_method_reference')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $paymentMethodReference = null; + + /** + * A unique identifier for an object. + * + * @var ?string $paymentMethodId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('payment_method_id')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $paymentMethodId = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\LinkedLedgerAccount $account + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('account')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\LinkedLedgerAccount|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LinkedLedgerAccount $account = null; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + * + * @var ?string $taxCode + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tax_code')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $taxCode = null; + + /** + * Discount percentage applied to this sales receipt. + * + * @var ?float $discountPercentage + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('discount_percentage')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $discountPercentage = null; + + /** + * Discount amount applied to this sales receipt. + * + * @var ?float $discountAmount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('discount_amount')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?float $discountAmount = null; + + /** + * Optional note to be associated with the sales receipt. + * + * @var ?string $note + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('note')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $note = null; + + /** + * Customer memo + * + * @var ?string $customerMemo + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('customer_memo')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $customerMemo = null; + + /** + * Optional reference message for the sales receipt. + * + * @var ?string $reference + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('reference')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $reference = null; + + /** + * + * @var ?\Apideck\Unify\Models\Components\LinkedDepartmentInput $department + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('department')] + #[\Speakeasy\Serializer\Annotation\Type('\Apideck\Unify\Models\Components\LinkedDepartmentInput|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LinkedDepartmentInput $department = null; + + /** + * A list of linked tracking categories. + * + * @var ?array $trackingCategories + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('tracking_categories')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Apideck\Unify\Models\Components\LinkedTrackingCategory|null>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $trackingCategories = null; + + /** + * 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. + * + * @var ?string $rowVersion + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('row_version')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $rowVersion = null; + + /** + * @param ?float $totalAmount + * @param ?array<\Apideck\Unify\Models\Components\InvoiceLineItemInput> $lineItems + * @param ?\Apideck\Unify\Models\Components\Address $billingAddress + * @param ?\Apideck\Unify\Models\Components\Address $shippingAddress + * @param ?array<\Apideck\Unify\Models\Components\CustomField1|\Apideck\Unify\Models\Components\CustomField2> $customFields + * @param ?array<\Apideck\Unify\Models\Components\PassThroughBody> $passThrough + * @param ?string $number + * @param ?\Apideck\Unify\Models\Components\LinkedCustomerInput $customer + * @param ?\Apideck\Unify\Models\Components\Currency $currency + * @param ?float $currencyRate + * @param ?bool $taxInclusive + * @param ?float $subTotal + * @param ?float $totalTax + * @param ?\DateTime $transactionDate + * @param ?string $paymentMethod + * @param ?string $paymentMethodReference + * @param ?string $paymentMethodId + * @param ?\Apideck\Unify\Models\Components\LinkedLedgerAccount $account + * @param ?string $taxCode + * @param ?float $discountPercentage + * @param ?float $discountAmount + * @param ?string $note + * @param ?string $customerMemo + * @param ?string $reference + * @param ?\Apideck\Unify\Models\Components\LinkedDepartmentInput $department + * @param ?array $trackingCategories + * @param ?string $rowVersion + * @phpstan-pure + */ + public function __construct(?float $totalAmount = null, ?array $lineItems = null, ?Address $billingAddress = null, ?Address $shippingAddress = null, ?array $customFields = null, ?array $passThrough = null, ?string $number = null, ?LinkedCustomerInput $customer = null, ?Currency $currency = null, ?float $currencyRate = null, ?bool $taxInclusive = null, ?float $subTotal = null, ?float $totalTax = null, ?\DateTime $transactionDate = null, ?string $paymentMethod = null, ?string $paymentMethodReference = null, ?string $paymentMethodId = null, ?LinkedLedgerAccount $account = null, ?string $taxCode = null, ?float $discountPercentage = null, ?float $discountAmount = null, ?string $note = null, ?string $customerMemo = null, ?string $reference = null, ?LinkedDepartmentInput $department = null, ?array $trackingCategories = null, ?string $rowVersion = null) + { + $this->totalAmount = $totalAmount; + $this->lineItems = $lineItems; + $this->billingAddress = $billingAddress; + $this->shippingAddress = $shippingAddress; + $this->customFields = $customFields; + $this->passThrough = $passThrough; + $this->number = $number; + $this->customer = $customer; + $this->currency = $currency; + $this->currencyRate = $currencyRate; + $this->taxInclusive = $taxInclusive; + $this->subTotal = $subTotal; + $this->totalTax = $totalTax; + $this->transactionDate = $transactionDate; + $this->paymentMethod = $paymentMethod; + $this->paymentMethodReference = $paymentMethodReference; + $this->paymentMethodId = $paymentMethodId; + $this->account = $account; + $this->taxCode = $taxCode; + $this->discountPercentage = $discountPercentage; + $this->discountAmount = $discountAmount; + $this->note = $note; + $this->customerMemo = $customerMemo; + $this->reference = $reference; + $this->department = $department; + $this->trackingCategories = $trackingCategories; + $this->rowVersion = $rowVersion; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesReceiptsFilter.php b/src/Models/Components/SalesReceiptsFilter.php new file mode 100644 index 00000000..2d9b93d7 --- /dev/null +++ b/src/Models/Components/SalesReceiptsFilter.php @@ -0,0 +1,39 @@ +updatedSince = $updatedSince; + $this->customerId = $customerId; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesReceiptsSort.php b/src/Models/Components/SalesReceiptsSort.php new file mode 100644 index 00000000..fea29db7 --- /dev/null +++ b/src/Models/Components/SalesReceiptsSort.php @@ -0,0 +1,40 @@ +by = $by; + $this->direction = $direction; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesReceiptsSortBy.php b/src/Models/Components/SalesReceiptsSortBy.php new file mode 100644 index 00000000..ea28232d --- /dev/null +++ b/src/Models/Components/SalesReceiptsSortBy.php @@ -0,0 +1,17 @@ +postedDate = $postedDate; $this->amount = $amount; @@ -102,5 +112,6 @@ public function __construct(\DateTime $postedDate, float $amount, CreditOrDebit $this->counterparty = $counterparty; $this->reference = $reference; $this->transactionType = $transactionType; + $this->merchantCategoryCode = $merchantCategoryCode; } } \ No newline at end of file diff --git a/src/Models/Components/UpdatePaymentMethodResponse.php b/src/Models/Components/UpdatePaymentMethodResponse.php new file mode 100644 index 00000000..39807167 --- /dev/null +++ b/src/Models/Components/UpdatePaymentMethodResponse.php @@ -0,0 +1,94 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\UnifiedId $data + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, UnifiedId $data, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Components/UpdateSalesReceiptResponse.php b/src/Models/Components/UpdateSalesReceiptResponse.php new file mode 100644 index 00000000..2f1820b1 --- /dev/null +++ b/src/Models/Components/UpdateSalesReceiptResponse.php @@ -0,0 +1,94 @@ + $raw + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('_raw')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $raw = null; + + /** + * @param int $statusCode + * @param string $status + * @param string $service + * @param string $resource + * @param string $operation + * @param \Apideck\Unify\Models\Components\UnifiedId $data + * @param ?array $raw + * @phpstan-pure + */ + public function __construct(int $statusCode, string $status, string $service, string $resource, string $operation, UnifiedId $data, ?array $raw = null) + { + $this->statusCode = $statusCode; + $this->status = $status; + $this->service = $service; + $this->resource = $resource; + $this->operation = $operation; + $this->data = $data; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingAttachmentsDownloadRequest.php b/src/Models/Operations/AccountingAttachmentsDownloadRequest.php index b164fe6d..2a46ff9b 100644 --- a/src/Models/Operations/AccountingAttachmentsDownloadRequest.php +++ b/src/Models/Operations/AccountingAttachmentsDownloadRequest.php @@ -76,6 +76,14 @@ class AccountingAttachmentsDownloadRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=fields')] public ?string $fields = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param \Apideck\Unify\Models\Components\AttachmentReferenceType $referenceType * @param string $referenceId @@ -84,10 +92,11 @@ class AccountingAttachmentsDownloadRequest * @param ?string $appId * @param ?string $serviceId * @param ?string $companyId + * @param ?bool $followRedirects * @param ?string $fields * @phpstan-pure */ - public function __construct(Components\AttachmentReferenceType $referenceType, string $referenceId, string $id, ?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $companyId = null, ?string $fields = null) + public function __construct(Components\AttachmentReferenceType $referenceType, string $referenceId, string $id, ?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $companyId = null, ?string $fields = null, ?bool $followRedirects = true) { $this->referenceType = $referenceType; $this->referenceId = $referenceId; @@ -97,5 +106,6 @@ public function __construct(Components\AttachmentReferenceType $referenceType, s $this->serviceId = $serviceId; $this->companyId = $companyId; $this->fields = $fields; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/AccountingAttachmentsDownloadResponse.php b/src/Models/Operations/AccountingAttachmentsDownloadResponse.php index 84fca06f..3d9d9613 100644 --- a/src/Models/Operations/AccountingAttachmentsDownloadResponse.php +++ b/src/Models/Operations/AccountingAttachmentsDownloadResponse.php @@ -20,7 +20,7 @@ class AccountingAttachmentsDownloadResponse public ?Components\HTTPMetadata $httpMeta; /** - * 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. * * @var ?string $getAttachmentDownloadResponse */ diff --git a/src/Models/Operations/AccountingPaymentMethodsAddRequest.php b/src/Models/Operations/AccountingPaymentMethodsAddRequest.php new file mode 100644 index 00000000..5bd378e2 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsAddRequest.php @@ -0,0 +1,70 @@ +accountingPaymentMethod = $accountingPaymentMethod; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsAddResponse.php b/src/Models/Operations/AccountingPaymentMethodsAddResponse.php new file mode 100644 index 00000000..6e9ce79e --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsAddResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->createPaymentMethodResponse = $createPaymentMethodResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsAllRequest.php b/src/Models/Operations/AccountingPaymentMethodsAllRequest.php new file mode 100644 index 00000000..faec8ac2 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsAllRequest.php @@ -0,0 +1,100 @@ + $passThrough + */ + #[SpeakeasyMetadata('queryParam:style=deepObject,explode=true,name=pass_through')] + public ?array $passThrough = null; + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + * + * @var ?string $cursor + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=cursor')] + public ?string $cursor = null; + + /** + * 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. + * + * @var ?string $fields + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=fields')] + public ?string $fields = null; + + /** + * Include raw response. Mostly used for debugging purposes + * + * @var ?bool $raw + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=raw')] + public ?bool $raw = null; + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + * + * @var ?int $limit + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] + public ?int $limit = null; + + /** + * @param ?bool $raw + * @param ?string $consumerId + * @param ?string $appId + * @param ?string $serviceId + * @param ?int $limit + * @param ?array $passThrough + * @param ?string $cursor + * @param ?string $fields + * @phpstan-pure + */ + public function __construct(?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?array $passThrough = null, ?string $cursor = null, ?string $fields = null, ?bool $raw = false, ?int $limit = 20) + { + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->passThrough = $passThrough; + $this->cursor = $cursor; + $this->fields = $fields; + $this->raw = $raw; + $this->limit = $limit; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsAllResponse.php b/src/Models/Operations/AccountingPaymentMethodsAllResponse.php new file mode 100644 index 00000000..22797a8e --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsAllResponse.php @@ -0,0 +1,65 @@ +httpMeta = $httpMeta; + $this->getPaymentMethodsResponse = $getPaymentMethodsResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } + /** + * @param string $name + * @param array $args + * @return ?AccountingPaymentMethodsAllResponse + */ + public function __call($name, $args): ?AccountingPaymentMethodsAllResponse + { + if ($name === 'next') { + return call_user_func_array($this->next, $args); + } + + return null; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsDeleteRequest.php b/src/Models/Operations/AccountingPaymentMethodsDeleteRequest.php new file mode 100644 index 00000000..a25dddba --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsDeleteRequest.php @@ -0,0 +1,70 @@ +id = $id; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsDeleteResponse.php b/src/Models/Operations/AccountingPaymentMethodsDeleteResponse.php new file mode 100644 index 00000000..17771246 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsDeleteResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->deletePaymentMethodResponse = $deletePaymentMethodResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsOneRequest.php b/src/Models/Operations/AccountingPaymentMethodsOneRequest.php new file mode 100644 index 00000000..dc5c62e1 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsOneRequest.php @@ -0,0 +1,80 @@ +
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. + * + * @var ?string $fields + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=fields')] + public ?string $fields = null; + + /** + * Include raw response. Mostly used for debugging purposes + * + * @var ?bool $raw + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=raw')] + public ?bool $raw = null; + + /** + * @param string $id + * @param ?string $consumerId + * @param ?string $appId + * @param ?string $serviceId + * @param ?bool $raw + * @param ?string $fields + * @phpstan-pure + */ + public function __construct(string $id, ?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $fields = null, ?bool $raw = false) + { + $this->id = $id; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->fields = $fields; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsOneResponse.php b/src/Models/Operations/AccountingPaymentMethodsOneResponse.php new file mode 100644 index 00000000..c1546cb6 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsOneResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->getPaymentMethodResponse = $getPaymentMethodResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsUpdateRequest.php b/src/Models/Operations/AccountingPaymentMethodsUpdateRequest.php new file mode 100644 index 00000000..42343830 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsUpdateRequest.php @@ -0,0 +1,80 @@ +id = $id; + $this->accountingPaymentMethod = $accountingPaymentMethod; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingPaymentMethodsUpdateResponse.php b/src/Models/Operations/AccountingPaymentMethodsUpdateResponse.php new file mode 100644 index 00000000..542ba267 --- /dev/null +++ b/src/Models/Operations/AccountingPaymentMethodsUpdateResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->updatePaymentMethodResponse = $updatePaymentMethodResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsAddRequest.php b/src/Models/Operations/AccountingSalesReceiptsAddRequest.php new file mode 100644 index 00000000..32dbdf9f --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsAddRequest.php @@ -0,0 +1,80 @@ +salesReceipt = $salesReceipt; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->companyId = $companyId; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsAddResponse.php b/src/Models/Operations/AccountingSalesReceiptsAddResponse.php new file mode 100644 index 00000000..03449d57 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsAddResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->createSalesReceiptResponse = $createSalesReceiptResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsAllRequest.php b/src/Models/Operations/AccountingSalesReceiptsAllRequest.php new file mode 100644 index 00000000..419d5477 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsAllRequest.php @@ -0,0 +1,131 @@ + $passThrough + */ + #[SpeakeasyMetadata('queryParam:style=deepObject,explode=true,name=pass_through')] + public ?array $passThrough = null; + + /** + * Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + * + * @var ?string $cursor + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=cursor')] + public ?string $cursor = null; + + /** + * 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. + * + * @var ?string $fields + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=fields')] + public ?string $fields = null; + + /** + * Include raw response. Mostly used for debugging purposes + * + * @var ?bool $raw + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=raw')] + public ?bool $raw = null; + + /** + * Number of results to return. Minimum 1, Maximum 200, Default 20 + * + * @var ?int $limit + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] + public ?int $limit = null; + + /** + * @param ?bool $raw + * @param ?string $consumerId + * @param ?string $appId + * @param ?string $serviceId + * @param ?string $companyId + * @param ?int $limit + * @param ?\Apideck\Unify\Models\Components\SalesReceiptsFilter $filter + * @param ?\Apideck\Unify\Models\Components\SalesReceiptsSort $sort + * @param ?array $passThrough + * @param ?string $cursor + * @param ?string $fields + * @phpstan-pure + */ + public function __construct(?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $companyId = null, ?Components\SalesReceiptsFilter $filter = null, ?Components\SalesReceiptsSort $sort = null, ?array $passThrough = null, ?string $cursor = null, ?string $fields = null, ?bool $raw = false, ?int $limit = 20) + { + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->companyId = $companyId; + $this->filter = $filter; + $this->sort = $sort; + $this->passThrough = $passThrough; + $this->cursor = $cursor; + $this->fields = $fields; + $this->raw = $raw; + $this->limit = $limit; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsAllResponse.php b/src/Models/Operations/AccountingSalesReceiptsAllResponse.php new file mode 100644 index 00000000..eadfa39e --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsAllResponse.php @@ -0,0 +1,65 @@ +httpMeta = $httpMeta; + $this->getSalesReceiptsResponse = $getSalesReceiptsResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } + /** + * @param string $name + * @param array $args + * @return ?AccountingSalesReceiptsAllResponse + */ + public function __call($name, $args): ?AccountingSalesReceiptsAllResponse + { + if ($name === 'next') { + return call_user_func_array($this->next, $args); + } + + return null; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsDeleteRequest.php b/src/Models/Operations/AccountingSalesReceiptsDeleteRequest.php new file mode 100644 index 00000000..b47169b4 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsDeleteRequest.php @@ -0,0 +1,80 @@ +id = $id; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->companyId = $companyId; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsDeleteResponse.php b/src/Models/Operations/AccountingSalesReceiptsDeleteResponse.php new file mode 100644 index 00000000..7c4961b7 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsDeleteResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->deleteSalesReceiptResponse = $deleteSalesReceiptResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsOneRequest.php b/src/Models/Operations/AccountingSalesReceiptsOneRequest.php new file mode 100644 index 00000000..b39088d2 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsOneRequest.php @@ -0,0 +1,90 @@ +
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. + * + * @var ?string $fields + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=fields')] + public ?string $fields = null; + + /** + * Include raw response. Mostly used for debugging purposes + * + * @var ?bool $raw + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=raw')] + public ?bool $raw = null; + + /** + * @param string $id + * @param ?string $consumerId + * @param ?string $appId + * @param ?string $serviceId + * @param ?string $companyId + * @param ?bool $raw + * @param ?string $fields + * @phpstan-pure + */ + public function __construct(string $id, ?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $companyId = null, ?string $fields = null, ?bool $raw = false) + { + $this->id = $id; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->companyId = $companyId; + $this->fields = $fields; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsOneResponse.php b/src/Models/Operations/AccountingSalesReceiptsOneResponse.php new file mode 100644 index 00000000..72d277a0 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsOneResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->getSalesReceiptResponse = $getSalesReceiptResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsUpdateRequest.php b/src/Models/Operations/AccountingSalesReceiptsUpdateRequest.php new file mode 100644 index 00000000..909aa822 --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsUpdateRequest.php @@ -0,0 +1,90 @@ +id = $id; + $this->salesReceipt = $salesReceipt; + $this->consumerId = $consumerId; + $this->appId = $appId; + $this->serviceId = $serviceId; + $this->companyId = $companyId; + $this->raw = $raw; + } +} \ No newline at end of file diff --git a/src/Models/Operations/AccountingSalesReceiptsUpdateResponse.php b/src/Models/Operations/AccountingSalesReceiptsUpdateResponse.php new file mode 100644 index 00000000..136dc4ec --- /dev/null +++ b/src/Models/Operations/AccountingSalesReceiptsUpdateResponse.php @@ -0,0 +1,48 @@ +httpMeta = $httpMeta; + $this->updateSalesReceiptResponse = $updateSalesReceiptResponse; + $this->unexpectedErrorResponse = $unexpectedErrorResponse; + } +} \ No newline at end of file diff --git a/src/Models/Operations/FileStorageFilesDownloadRequest.php b/src/Models/Operations/FileStorageFilesDownloadRequest.php index 1cfdf3a7..47ef6a4c 100644 --- a/src/Models/Operations/FileStorageFilesDownloadRequest.php +++ b/src/Models/Operations/FileStorageFilesDownloadRequest.php @@ -51,20 +51,30 @@ class FileStorageFilesDownloadRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=fields')] public ?string $fields = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $id * @param ?string $consumerId * @param ?string $appId * @param ?string $serviceId + * @param ?bool $followRedirects * @param ?string $fields * @phpstan-pure */ - public function __construct(string $id, ?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $fields = null) + public function __construct(string $id, ?string $consumerId = null, ?string $appId = null, ?string $serviceId = null, ?string $fields = null, ?bool $followRedirects = true) { $this->id = $id; $this->consumerId = $consumerId; $this->appId = $appId; $this->serviceId = $serviceId; $this->fields = $fields; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/FileStorageFilesDownloadResponse.php b/src/Models/Operations/FileStorageFilesDownloadResponse.php index 1000cdd8..afd2bca6 100644 --- a/src/Models/Operations/FileStorageFilesDownloadResponse.php +++ b/src/Models/Operations/FileStorageFilesDownloadResponse.php @@ -20,7 +20,7 @@ class FileStorageFilesDownloadResponse public ?Components\HTTPMetadata $httpMeta; /** - * 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. * * @var ?string $getFileDownloadResponse */ diff --git a/src/Models/Operations/FileStorageFilesExportResponse.php b/src/Models/Operations/FileStorageFilesExportResponse.php index 10cea10b..4904b58d 100644 --- a/src/Models/Operations/FileStorageFilesExportResponse.php +++ b/src/Models/Operations/FileStorageFilesExportResponse.php @@ -20,7 +20,7 @@ class FileStorageFilesExportResponse public ?Components\HTTPMetadata $httpMeta; /** - * 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. * * @var ?string $getFileDownloadResponse */ diff --git a/src/Models/Operations/ProxyDeleteProxyRequest.php b/src/Models/Operations/ProxyDeleteProxyRequest.php index de9c61b0..d4913d7b 100644 --- a/src/Models/Operations/ProxyDeleteProxyRequest.php +++ b/src/Models/Operations/ProxyDeleteProxyRequest.php @@ -67,6 +67,14 @@ class ProxyDeleteProxyRequest #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-timeout')] public ?int $timeout = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $serviceId * @param string $downstreamUrl @@ -75,9 +83,10 @@ class ProxyDeleteProxyRequest * @param ?string $unifiedApi * @param ?string $downstreamAuthorization * @param ?int $timeout + * @param ?bool $followRedirects * @phpstan-pure */ - public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?int $timeout = 28000) + public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?int $timeout = 28000, ?bool $followRedirects = true) { $this->serviceId = $serviceId; $this->downstreamUrl = $downstreamUrl; @@ -86,5 +95,6 @@ public function __construct(string $serviceId, string $downstreamUrl, ?string $c $this->unifiedApi = $unifiedApi; $this->downstreamAuthorization = $downstreamAuthorization; $this->timeout = $timeout; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/ProxyDeleteProxyResponse.php b/src/Models/Operations/ProxyDeleteProxyResponse.php index 0530794e..745b474b 100644 --- a/src/Models/Operations/ProxyDeleteProxyResponse.php +++ b/src/Models/Operations/ProxyDeleteProxyResponse.php @@ -27,42 +27,42 @@ class ProxyDeleteProxyResponse public array $headers; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?array $responseJson */ public ?array $responseJson = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseBinary */ public ?string $responseBinary = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responsePdf */ public ?string $responsePdf = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseXml */ public ?string $responseXml = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseCsv */ public ?string $responseCsv = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseText */ diff --git a/src/Models/Operations/ProxyGetProxyRequest.php b/src/Models/Operations/ProxyGetProxyRequest.php index 7863a9c4..66b23cb7 100644 --- a/src/Models/Operations/ProxyGetProxyRequest.php +++ b/src/Models/Operations/ProxyGetProxyRequest.php @@ -67,6 +67,14 @@ class ProxyGetProxyRequest #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-timeout')] public ?int $timeout = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $serviceId * @param string $downstreamUrl @@ -75,9 +83,10 @@ class ProxyGetProxyRequest * @param ?string $unifiedApi * @param ?string $downstreamAuthorization * @param ?int $timeout + * @param ?bool $followRedirects * @phpstan-pure */ - public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?int $timeout = 28000) + public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?int $timeout = 28000, ?bool $followRedirects = true) { $this->serviceId = $serviceId; $this->downstreamUrl = $downstreamUrl; @@ -86,5 +95,6 @@ public function __construct(string $serviceId, string $downstreamUrl, ?string $c $this->unifiedApi = $unifiedApi; $this->downstreamAuthorization = $downstreamAuthorization; $this->timeout = $timeout; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/ProxyGetProxyResponse.php b/src/Models/Operations/ProxyGetProxyResponse.php index 3d822e09..0e4de5c7 100644 --- a/src/Models/Operations/ProxyGetProxyResponse.php +++ b/src/Models/Operations/ProxyGetProxyResponse.php @@ -27,42 +27,42 @@ class ProxyGetProxyResponse public array $headers; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?array $responseJson */ public ?array $responseJson = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseBinary */ public ?string $responseBinary = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responsePdf */ public ?string $responsePdf = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseXml */ public ?string $responseXml = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseCsv */ public ?string $responseCsv = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseText */ diff --git a/src/Models/Operations/ProxyOptionsProxyRequest.php b/src/Models/Operations/ProxyOptionsProxyRequest.php index 0fedda90..3b52b714 100644 --- a/src/Models/Operations/ProxyOptionsProxyRequest.php +++ b/src/Models/Operations/ProxyOptionsProxyRequest.php @@ -67,6 +67,14 @@ class ProxyOptionsProxyRequest #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-timeout')] public ?int $timeout = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $serviceId * @param string $downstreamUrl @@ -75,9 +83,10 @@ class ProxyOptionsProxyRequest * @param ?string $unifiedApi * @param ?string $downstreamAuthorization * @param ?int $timeout + * @param ?bool $followRedirects * @phpstan-pure */ - public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?int $timeout = 28000) + public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?int $timeout = 28000, ?bool $followRedirects = true) { $this->serviceId = $serviceId; $this->downstreamUrl = $downstreamUrl; @@ -86,5 +95,6 @@ public function __construct(string $serviceId, string $downstreamUrl, ?string $c $this->unifiedApi = $unifiedApi; $this->downstreamAuthorization = $downstreamAuthorization; $this->timeout = $timeout; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/ProxyOptionsProxyResponse.php b/src/Models/Operations/ProxyOptionsProxyResponse.php index 83f36b2d..962ec591 100644 --- a/src/Models/Operations/ProxyOptionsProxyResponse.php +++ b/src/Models/Operations/ProxyOptionsProxyResponse.php @@ -27,42 +27,42 @@ class ProxyOptionsProxyResponse public array $headers; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?array $responseJson */ public ?array $responseJson = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseBinary */ public ?string $responseBinary = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responsePdf */ public ?string $responsePdf = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseXml */ public ?string $responseXml = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseCsv */ public ?string $responseCsv = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseText */ diff --git a/src/Models/Operations/ProxyPatchProxyRequest.php b/src/Models/Operations/ProxyPatchProxyRequest.php index 61ce1261..bc81ced2 100644 --- a/src/Models/Operations/ProxyPatchProxyRequest.php +++ b/src/Models/Operations/ProxyPatchProxyRequest.php @@ -75,6 +75,14 @@ class ProxyPatchProxyRequest #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-timeout')] public ?int $timeout = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $serviceId * @param string $downstreamUrl @@ -83,10 +91,11 @@ class ProxyPatchProxyRequest * @param ?string $unifiedApi * @param ?string $downstreamAuthorization * @param ?int $timeout + * @param ?bool $followRedirects * @param ?string $requestBody * @phpstan-pure */ - public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?string $requestBody = null, ?int $timeout = 28000) + public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?string $requestBody = null, ?int $timeout = 28000, ?bool $followRedirects = true) { $this->serviceId = $serviceId; $this->downstreamUrl = $downstreamUrl; @@ -96,5 +105,6 @@ public function __construct(string $serviceId, string $downstreamUrl, ?string $c $this->downstreamAuthorization = $downstreamAuthorization; $this->requestBody = $requestBody; $this->timeout = $timeout; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/ProxyPatchProxyResponse.php b/src/Models/Operations/ProxyPatchProxyResponse.php index 9987dfad..ff3b5528 100644 --- a/src/Models/Operations/ProxyPatchProxyResponse.php +++ b/src/Models/Operations/ProxyPatchProxyResponse.php @@ -27,42 +27,42 @@ class ProxyPatchProxyResponse public array $headers; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?array $responseJson */ public ?array $responseJson = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseBinary */ public ?string $responseBinary = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responsePdf */ public ?string $responsePdf = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseXml */ public ?string $responseXml = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseCsv */ public ?string $responseCsv = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseText */ diff --git a/src/Models/Operations/ProxyPostProxyRequest.php b/src/Models/Operations/ProxyPostProxyRequest.php index 1dfcd88d..6f48a321 100644 --- a/src/Models/Operations/ProxyPostProxyRequest.php +++ b/src/Models/Operations/ProxyPostProxyRequest.php @@ -75,6 +75,14 @@ class ProxyPostProxyRequest #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-timeout')] public ?int $timeout = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $serviceId * @param string $downstreamUrl @@ -83,10 +91,11 @@ class ProxyPostProxyRequest * @param ?string $unifiedApi * @param ?string $downstreamAuthorization * @param ?int $timeout + * @param ?bool $followRedirects * @param ?string $requestBody * @phpstan-pure */ - public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?string $requestBody = null, ?int $timeout = 28000) + public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?string $requestBody = null, ?int $timeout = 28000, ?bool $followRedirects = true) { $this->serviceId = $serviceId; $this->downstreamUrl = $downstreamUrl; @@ -96,5 +105,6 @@ public function __construct(string $serviceId, string $downstreamUrl, ?string $c $this->downstreamAuthorization = $downstreamAuthorization; $this->requestBody = $requestBody; $this->timeout = $timeout; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/ProxyPostProxyResponse.php b/src/Models/Operations/ProxyPostProxyResponse.php index 27515fb9..641f507c 100644 --- a/src/Models/Operations/ProxyPostProxyResponse.php +++ b/src/Models/Operations/ProxyPostProxyResponse.php @@ -27,42 +27,42 @@ class ProxyPostProxyResponse public array $headers; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?array $responseJson */ public ?array $responseJson = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseBinary */ public ?string $responseBinary = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responsePdf */ public ?string $responsePdf = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseXml */ public ?string $responseXml = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseCsv */ public ?string $responseCsv = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseText */ diff --git a/src/Models/Operations/ProxyPutProxyRequest.php b/src/Models/Operations/ProxyPutProxyRequest.php index 1037c445..ef15de1d 100644 --- a/src/Models/Operations/ProxyPutProxyRequest.php +++ b/src/Models/Operations/ProxyPutProxyRequest.php @@ -75,6 +75,14 @@ class ProxyPutProxyRequest #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-timeout')] public ?int $timeout = null; + /** + * 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. + * + * @var ?bool $followRedirects + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=x-apideck-follow-redirects')] + public ?bool $followRedirects = null; + /** * @param string $serviceId * @param string $downstreamUrl @@ -83,10 +91,11 @@ class ProxyPutProxyRequest * @param ?string $unifiedApi * @param ?string $downstreamAuthorization * @param ?int $timeout + * @param ?bool $followRedirects * @param ?string $requestBody * @phpstan-pure */ - public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?string $requestBody = null, ?int $timeout = 28000) + public function __construct(string $serviceId, string $downstreamUrl, ?string $consumerId = null, ?string $appId = null, ?string $unifiedApi = null, ?string $downstreamAuthorization = null, ?string $requestBody = null, ?int $timeout = 28000, ?bool $followRedirects = true) { $this->serviceId = $serviceId; $this->downstreamUrl = $downstreamUrl; @@ -96,5 +105,6 @@ public function __construct(string $serviceId, string $downstreamUrl, ?string $c $this->downstreamAuthorization = $downstreamAuthorization; $this->requestBody = $requestBody; $this->timeout = $timeout; + $this->followRedirects = $followRedirects; } } \ No newline at end of file diff --git a/src/Models/Operations/ProxyPutProxyResponse.php b/src/Models/Operations/ProxyPutProxyResponse.php index b24095b9..73a047ac 100644 --- a/src/Models/Operations/ProxyPutProxyResponse.php +++ b/src/Models/Operations/ProxyPutProxyResponse.php @@ -27,42 +27,42 @@ class ProxyPutProxyResponse public array $headers; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?array $responseJson */ public ?array $responseJson = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseBinary */ public ?string $responseBinary = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responsePdf */ public ?string $responsePdf = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseXml */ public ?string $responseXml = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseCsv */ public ?string $responseCsv = null; /** - * Ok + * Ok. When the request includes `x-apideck-follow-redirects: false` and the downstream response would otherwise redirect to a presigned URL (oversized responses), the body is instead an `application/json` object `{ url, expires_at }` — fetch `url` explicitly (without the Authorization header) to retrieve the payload. * * @var ?string $responseText */ diff --git a/src/PaymentMethods.php b/src/PaymentMethods.php new file mode 100644 index 00000000..e38826f8 --- /dev/null +++ b/src/PaymentMethods.php @@ -0,0 +1,988 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * Create Payment Method + * + * Create Payment Method + * + * @param \Apideck\Unify\Models\Operations\AccountingPaymentMethodsAddRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingPaymentMethodsAddResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function create(Operations\AccountingPaymentMethodsAddRequest $request, ?Options $options = null): Operations\AccountingPaymentMethodsAddResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/payment-methods'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'accountingPaymentMethod', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + + $qp = Utils\Utils::getQueryParams(Operations\AccountingPaymentMethodsAddRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.paymentMethodsAdd', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['201'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\CreatePaymentMethodResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsAddResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + createPaymentMethodResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsAddResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + + /** + * List Payment Methods + * + * List Payment Methods + * + * @param ?\Apideck\Unify\Models\Operations\AccountingPaymentMethodsAllRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingPaymentMethodsAllResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + private function listIndividual(?Operations\AccountingPaymentMethodsAllRequest $request = null, ?Options $options = null): Operations\AccountingPaymentMethodsAllResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/payment-methods'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\AccountingPaymentMethodsAllRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.paymentMethodsAll', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\GetPaymentMethodsResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsAllResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + getPaymentMethodsResponse: $obj + ); + $sdk = $this; + + $response->next = function () use ($sdk, $responseData, $request): ?Operations\AccountingPaymentMethodsAllResponse { + $jsonObject = new \JsonPath\JsonObject($responseData); + $nextCursor = $jsonObject->get('$.meta.cursors.next'); + if ($nextCursor == null) { + return null; + } else { + $nextCursor = $nextCursor[0]; + if ($nextCursor == null || (is_string($nextCursor) && trim($nextCursor) === '')) { + return null; + } + } + + return $sdk->listIndividual( + request: new Operations\AccountingPaymentMethodsAllRequest( + raw: $request != null ? $request->raw : null, + consumerId: $request != null ? $request->consumerId : null, + appId: $request != null ? $request->appId : null, + serviceId: $request != null ? $request->serviceId : null, + cursor: $nextCursor, + limit: $request != null ? $request->limit : null, + fields: $request != null ? $request->fields : null, + passThrough: $request != null ? $request->passThrough : null, + ), + ); + }; + + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsAllResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + $sdk = $this; + + $response->next = function () use ($sdk, $responseData, $request): ?Operations\AccountingPaymentMethodsAllResponse { + $jsonObject = new \JsonPath\JsonObject($responseData); + $nextCursor = $jsonObject->get('$.meta.cursors.next'); + if ($nextCursor == null) { + return null; + } else { + $nextCursor = $nextCursor[0]; + if ($nextCursor == null || (is_string($nextCursor) && trim($nextCursor) === '')) { + return null; + } + } + + return $sdk->listIndividual( + request: new Operations\AccountingPaymentMethodsAllRequest( + raw: $request != null ? $request->raw : null, + consumerId: $request != null ? $request->consumerId : null, + appId: $request != null ? $request->appId : null, + serviceId: $request != null ? $request->serviceId : null, + cursor: $nextCursor, + limit: $request != null ? $request->limit : null, + fields: $request != null ? $request->fields : null, + passThrough: $request != null ? $request->passThrough : null, + ), + ); + }; + + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + /** + * List Payment Methods + * + * List Payment Methods + * + * @param ?\Apideck\Unify\Models\Operations\AccountingPaymentMethodsAllRequest $request + * @return \Generator<\Apideck\Unify\Models\Operations\AccountingPaymentMethodsAllResponse> + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function list(?Operations\AccountingPaymentMethodsAllRequest $request = null, ?Options $options = null): \Generator + { + $res = $this->listIndividual($request, $options); + while ($res !== null) { + yield $res; + $res = $res->next($res); + } + } + + /** + * Delete Payment Method + * + * Delete Payment Method + * + * @param \Apideck\Unify\Models\Operations\AccountingPaymentMethodsDeleteRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingPaymentMethodsDeleteResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function delete(Operations\AccountingPaymentMethodsDeleteRequest $request, ?Options $options = null): Operations\AccountingPaymentMethodsDeleteResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/payment-methods/{id}', Operations\AccountingPaymentMethodsDeleteRequest::class, $request, $this->sdkConfiguration->globals); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\AccountingPaymentMethodsDeleteRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.paymentMethodsDelete', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\DeletePaymentMethodResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsDeleteResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + deletePaymentMethodResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsDeleteResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + + /** + * Get Payment Method + * + * Get Payment Method + * + * @param \Apideck\Unify\Models\Operations\AccountingPaymentMethodsOneRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingPaymentMethodsOneResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function get(Operations\AccountingPaymentMethodsOneRequest $request, ?Options $options = null): Operations\AccountingPaymentMethodsOneResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/payment-methods/{id}', Operations\AccountingPaymentMethodsOneRequest::class, $request, $this->sdkConfiguration->globals); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\AccountingPaymentMethodsOneRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.paymentMethodsOne', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\GetPaymentMethodResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsOneResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + getPaymentMethodResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsOneResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + + /** + * Update Payment Method + * + * Update Payment Method + * + * @param \Apideck\Unify\Models\Operations\AccountingPaymentMethodsUpdateRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingPaymentMethodsUpdateResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function update(Operations\AccountingPaymentMethodsUpdateRequest $request, ?Options $options = null): Operations\AccountingPaymentMethodsUpdateResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/payment-methods/{id}', Operations\AccountingPaymentMethodsUpdateRequest::class, $request, $this->sdkConfiguration->globals); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'accountingPaymentMethod', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + + $qp = Utils\Utils::getQueryParams(Operations\AccountingPaymentMethodsUpdateRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.paymentMethodsUpdate', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UpdatePaymentMethodResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsUpdateResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + updatePaymentMethodResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingPaymentMethodsUpdateResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + +} \ No newline at end of file diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index a9bddc92..cadfbae2 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -24,13 +24,13 @@ class SDKConfiguration public string $language = 'php'; - public string $openapiDocVersion = '10.32.0'; + public string $openapiDocVersion = '10.38.1'; - public string $sdkVersion = '0.22.0'; + public string $sdkVersion = '0.23.0'; - public string $genVersion = '2.926.8'; + public string $genVersion = '2.928.0'; - public string $userAgent = 'speakeasy-sdk/php 0.22.0 2.926.8 10.32.0 apideck-libraries/sdk-php'; + public string $userAgent = 'speakeasy-sdk/php 0.23.0 2.928.0 10.38.1 apideck-libraries/sdk-php'; /** @var array>> */ public ?array $globals = [ 'parameters' => [], diff --git a/src/SalesReceipts.php b/src/SalesReceipts.php new file mode 100644 index 00000000..614a6ec5 --- /dev/null +++ b/src/SalesReceipts.php @@ -0,0 +1,994 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * Create Sales Receipt + * + * Create Sales Receipt + * + * @param \Apideck\Unify\Models\Operations\AccountingSalesReceiptsAddRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingSalesReceiptsAddResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function create(Operations\AccountingSalesReceiptsAddRequest $request, ?Options $options = null): Operations\AccountingSalesReceiptsAddResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/sales-receipts'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'salesReceipt', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + + $qp = Utils\Utils::getQueryParams(Operations\AccountingSalesReceiptsAddRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.salesReceiptsAdd', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['201'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\CreateSalesReceiptResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsAddResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + createSalesReceiptResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsAddResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + + /** + * List Sales Receipts + * + * List Sales Receipts + * + * @param ?\Apideck\Unify\Models\Operations\AccountingSalesReceiptsAllRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingSalesReceiptsAllResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + private function listIndividual(?Operations\AccountingSalesReceiptsAllRequest $request = null, ?Options $options = null): Operations\AccountingSalesReceiptsAllResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/sales-receipts'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\AccountingSalesReceiptsAllRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.salesReceiptsAll', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\GetSalesReceiptsResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsAllResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + getSalesReceiptsResponse: $obj + ); + $sdk = $this; + + $response->next = function () use ($sdk, $responseData, $request): ?Operations\AccountingSalesReceiptsAllResponse { + $jsonObject = new \JsonPath\JsonObject($responseData); + $nextCursor = $jsonObject->get('$.meta.cursors.next'); + if ($nextCursor == null) { + return null; + } else { + $nextCursor = $nextCursor[0]; + if ($nextCursor == null || (is_string($nextCursor) && trim($nextCursor) === '')) { + return null; + } + } + + return $sdk->listIndividual( + request: new Operations\AccountingSalesReceiptsAllRequest( + raw: $request != null ? $request->raw : null, + consumerId: $request != null ? $request->consumerId : null, + appId: $request != null ? $request->appId : null, + serviceId: $request != null ? $request->serviceId : null, + companyId: $request != null ? $request->companyId : null, + cursor: $nextCursor, + limit: $request != null ? $request->limit : null, + filter: $request != null ? $request->filter : null, + sort: $request != null ? $request->sort : null, + passThrough: $request != null ? $request->passThrough : null, + fields: $request != null ? $request->fields : null, + ), + ); + }; + + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsAllResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + $sdk = $this; + + $response->next = function () use ($sdk, $responseData, $request): ?Operations\AccountingSalesReceiptsAllResponse { + $jsonObject = new \JsonPath\JsonObject($responseData); + $nextCursor = $jsonObject->get('$.meta.cursors.next'); + if ($nextCursor == null) { + return null; + } else { + $nextCursor = $nextCursor[0]; + if ($nextCursor == null || (is_string($nextCursor) && trim($nextCursor) === '')) { + return null; + } + } + + return $sdk->listIndividual( + request: new Operations\AccountingSalesReceiptsAllRequest( + raw: $request != null ? $request->raw : null, + consumerId: $request != null ? $request->consumerId : null, + appId: $request != null ? $request->appId : null, + serviceId: $request != null ? $request->serviceId : null, + companyId: $request != null ? $request->companyId : null, + cursor: $nextCursor, + limit: $request != null ? $request->limit : null, + filter: $request != null ? $request->filter : null, + sort: $request != null ? $request->sort : null, + passThrough: $request != null ? $request->passThrough : null, + fields: $request != null ? $request->fields : null, + ), + ); + }; + + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + /** + * List Sales Receipts + * + * List Sales Receipts + * + * @param ?\Apideck\Unify\Models\Operations\AccountingSalesReceiptsAllRequest $request + * @return \Generator<\Apideck\Unify\Models\Operations\AccountingSalesReceiptsAllResponse> + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function list(?Operations\AccountingSalesReceiptsAllRequest $request = null, ?Options $options = null): \Generator + { + $res = $this->listIndividual($request, $options); + while ($res !== null) { + yield $res; + $res = $res->next($res); + } + } + + /** + * Delete Sales Receipt + * + * Delete Sales Receipt + * + * @param \Apideck\Unify\Models\Operations\AccountingSalesReceiptsDeleteRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingSalesReceiptsDeleteResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function delete(Operations\AccountingSalesReceiptsDeleteRequest $request, ?Options $options = null): Operations\AccountingSalesReceiptsDeleteResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/sales-receipts/{id}', Operations\AccountingSalesReceiptsDeleteRequest::class, $request, $this->sdkConfiguration->globals); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\AccountingSalesReceiptsDeleteRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.salesReceiptsDelete', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\DeleteSalesReceiptResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsDeleteResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + deleteSalesReceiptResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsDeleteResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + + /** + * Get Sales Receipt + * + * Get Sales Receipt + * + * @param \Apideck\Unify\Models\Operations\AccountingSalesReceiptsOneRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingSalesReceiptsOneResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function get(Operations\AccountingSalesReceiptsOneRequest $request, ?Options $options = null): Operations\AccountingSalesReceiptsOneResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/sales-receipts/{id}', Operations\AccountingSalesReceiptsOneRequest::class, $request, $this->sdkConfiguration->globals); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\AccountingSalesReceiptsOneRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.salesReceiptsOne', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\GetSalesReceiptResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsOneResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + getSalesReceiptResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsOneResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + + /** + * Update Sales Receipt + * + * Update Sales Receipt + * + * @param \Apideck\Unify\Models\Operations\AccountingSalesReceiptsUpdateRequest $request + * @return \Apideck\Unify\Models\Operations\AccountingSalesReceiptsUpdateResponse + * @throws \Apideck\Unify\Models\Errors\APIException + */ + public function update(Operations\AccountingSalesReceiptsUpdateRequest $request, ?Options $options = null): Operations\AccountingSalesReceiptsUpdateResponse + { + $retryConfig = null; + if ($options) { + $retryConfig = $options->retryConfig; + } + if ($retryConfig === null && $this->sdkConfiguration->retryConfig) { + $retryConfig = $this->sdkConfiguration->retryConfig; + } else { + $retryConfig = new Retry\RetryConfigBackoff( + initialIntervalMs: 500, + maxIntervalMs: 60000, + exponent: 1.5, + maxElapsedTimeMs: 900000, + retryConnectionErrors: true, + ); + } + $retryCodes = null; + if ($options) { + $retryCodes = $options->retryCodes; + } + if ($retryCodes === null) { + $retryCodes = [ + '408', + '500', + '502', + '503', + '504', + ]; + } + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/accounting/sales-receipts/{id}', Operations\AccountingSalesReceiptsUpdateRequest::class, $request, $this->sdkConfiguration->globals); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'salesReceipt', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + + $qp = Utils\Utils::getQueryParams(Operations\AccountingSalesReceiptsUpdateRequest::class, $request, $urlOverride, $this->sdkConfiguration->globals); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'accounting.salesReceiptsUpdate', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = RetryUtils::retryWrapper(fn () => $this->sdkConfiguration->client->send($httpRequest, $httpOptions), $retryConfig, $retryCodes); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UpdateSalesReceiptResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsUpdateResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + updateSalesReceiptResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\BadRequestResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnauthorizedResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['402'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\PaymentRequiredResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\NotFoundResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Errors\UnprocessableResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \Apideck\Unify\Models\Errors\APIException('API error occurred', $httpRequest, $httpResponse); + } else { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\Apideck\Unify\Models\Components\UnexpectedErrorResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\AccountingSalesReceiptsUpdateResponse( + httpMeta: new Components\HTTPMetadata( + response: $httpResponse, + request: $httpRequest + ), + unexpectedErrorResponse: $obj + ); + + return $response; + } else { + throw new \Apideck\Unify\Models\Errors\APIException('Unknown content type received', $httpRequest, $httpResponse); + } + } + } + +} \ No newline at end of file