From 292a88d5b0083d77cc55fa7d11fbf279ca3f72e7 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 4 Nov 2026 16:11:35 +0000 Subject: [PATCH 1/2] =?UTF-8?q?##=20Java=20SDK=20Changes:=20*=20`apideck.a?= =?UTF-8?q?ccounting.creditNotes.update()`:=20=20`request`=20**Changed**?= =?UTF-8?q?=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`apideck.accounting.pa?= =?UTF-8?q?yments.update()`:=20=20`request`=20**Changed**=20(Breaking=20?= =?UTF-8?q?=E2=9A=A0=EF=B8=8F)=20*=20`apideck.accounting.refunds.update()`?= =?UTF-8?q?:=20=20`request`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F?= =?UTF-8?q?)=20*=20`apideck.accounting.salesReceipts.update()`:=20=20`requ?= =?UTF-8?q?est`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`api?= =?UTF-8?q?deck.accounting.billPayments.update()`:=20=20`request`=20**Chan?= =?UTF-8?q?ged**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`apideck.accounti?= =?UTF-8?q?ng.expenses.update()`:=20=20`request`=20**Changed**=20(Breaking?= =?UTF-8?q?=20=E2=9A=A0=EF=B8=8F)=20*=20`apideck.accounting.projects.updat?= =?UTF-8?q?e()`:=20=20`request`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`apideck.accounting.expenseCategories.update()?= =?UTF-8?q?`:=20=20`request`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`apideck.accounting.expenseReports.update()`:?= =?UTF-8?q?=20=20`request`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 417 ++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 4 +- RELEASES.md | 12 +- .../components/BillPaymentUpdateInput.md | 32 + .../BillPaymentUpdateInputAllocationType.md | 27 + .../BillPaymentUpdateInputAllocations.md | 11 + .../BillPaymentUpdateInputBillPaymentType.md | 24 + .../components/CreditNoteUpdateInput.md | 41 + .../CreditNoteUpdateInputCreditNoteStatus.md | 27 + .../CreditNoteUpdateInputCreditNoteType.md | 22 + .../components/ExpenseCategoryUpdateInput.md | 21 + .../ExpenseCategoryUpdateInputStatus.md | 22 + .../components/ExpenseReportUpdateInput.md | 37 + ...xpenseReportUpdateInputAccountingPeriod.md | 11 + .../ExpenseReportUpdateInputApprovedBy.md | 11 + .../ExpenseReportUpdateInputEmployee.md | 11 + .../ExpenseReportUpdateInputStatus.md | 27 + docs/models/components/ExpenseUpdateInput.md | 38 + .../ExpenseUpdateInputExpenseType.md | 22 + .../ExpenseUpdateInputPaymentType.md | 24 + .../components/ExpenseUpdateInputStatus.md | 23 + docs/models/components/PaymentUpdateInput.md | 35 + docs/models/components/ProjectUpdateInput.md | 45 + .../ProjectUpdateInputBillingMethod.md | 25 + .../ProjectUpdateInputDepartment.md | 11 + .../ProjectUpdateInputParentProject.md | 11 + .../components/ProjectUpdateInputPriority.md | 24 + .../ProjectUpdateInputProjectPhase.md | 26 + .../ProjectUpdateInputProjectStatus.md | 28 + .../ProjectUpdateInputProjectType.md | 26 + .../ProjectUpdateInputScheduleStatus.md | 24 + docs/models/components/RefundUpdateInput.md | 41 + .../components/SalesReceiptUpdateInput.md | 36 + .../AccountingBillPaymentsUpdateRequest.md | 2 +- .../AccountingCreditNotesUpdateRequest.md | 2 +- ...ccountingExpenseCategoriesUpdateRequest.md | 2 +- .../AccountingExpenseReportsUpdateRequest.md | 2 +- .../AccountingExpensesUpdateRequest.md | 2 +- .../AccountingPaymentsUpdateRequest.md | 2 +- .../AccountingProjectsUpdateRequest.md | 2 +- .../AccountingRefundsUpdateRequest.md | 2 +- .../AccountingSalesReceiptsUpdateRequest.md | 2 +- docs/sdks/billpayments/README.md | 20 +- docs/sdks/creditnotes/README.md | 8 +- docs/sdks/expensecategories/README.md | 6 +- docs/sdks/expensereports/README.md | 18 +- docs/sdks/expenses/README.md | 32 +- docs/sdks/payments/README.md | 6 +- docs/sdks/projects/README.md | 18 +- docs/sdks/refunds/README.md | 4 +- docs/sdks/salesreceipts/README.md | 4 +- gradle.properties | 2 +- .../com/apideck/unify/SDKConfiguration.java | 4 +- .../components/BillPaymentUpdateInput.java | 1423 +++++++++++ .../BillPaymentUpdateInputAllocationType.java | 152 ++ .../BillPaymentUpdateInputAllocations.java | 319 +++ ...BillPaymentUpdateInputBillPaymentType.java | 140 + .../components/CreditNoteUpdateInput.java | 1938 ++++++++++++++ ...CreditNoteUpdateInputCreditNoteStatus.java | 152 ++ .../CreditNoteUpdateInputCreditNoteType.java | 135 + .../ExpenseCategoryUpdateInput.java | 765 ++++++ .../ExpenseCategoryUpdateInputStatus.java | 132 + .../components/ExpenseReportUpdateInput.java | 1710 +++++++++++++ ...enseReportUpdateInputAccountingPeriod.java | 192 ++ .../ExpenseReportUpdateInputApprovedBy.java | 192 ++ .../ExpenseReportUpdateInputEmployee.java | 192 ++ .../ExpenseReportUpdateInputStatus.java | 152 ++ .../models/components/ExpenseUpdateInput.java | 1844 ++++++++++++++ .../ExpenseUpdateInputExpenseType.java | 132 + .../ExpenseUpdateInputPaymentType.java | 140 + .../components/ExpenseUpdateInputStatus.java | 136 + .../models/components/PaymentUpdateInput.java | 1662 ++++++++++++ .../models/components/ProjectUpdateInput.java | 2247 +++++++++++++++++ .../ProjectUpdateInputBillingMethod.java | 144 ++ .../ProjectUpdateInputDepartment.java | 192 ++ .../ProjectUpdateInputParentProject.java | 192 ++ .../ProjectUpdateInputPriority.java | 140 + .../ProjectUpdateInputProjectPhase.java | 148 ++ .../ProjectUpdateInputProjectStatus.java | 156 ++ .../ProjectUpdateInputProjectType.java | 148 ++ .../ProjectUpdateInputScheduleStatus.java | 140 + .../models/components/RefundUpdateInput.java | 2002 +++++++++++++++ .../components/SalesReceiptUpdateInput.java | 1651 ++++++++++++ .../AccountingBillPaymentsUpdateRequest.java | 40 +- .../AccountingCreditNotesUpdateRequest.java | 40 +- ...ountingExpenseCategoriesUpdateRequest.java | 40 +- ...AccountingExpenseReportsUpdateRequest.java | 40 +- .../AccountingExpensesUpdateRequest.java | 40 +- .../AccountingPaymentsUpdateRequest.java | 40 +- .../AccountingProjectsUpdateRequest.java | 40 +- .../AccountingRefundsUpdateRequest.java | 40 +- .../AccountingSalesReceiptsUpdateRequest.java | 40 +- .../AccountingBillPaymentsUpdate.java | 2 +- .../AccountingCreditNotesUpdate.java | 2 +- .../AccountingExpenseCategoriesUpdate.java | 2 +- .../AccountingExpenseReportsUpdate.java | 2 +- .../operations/AccountingExpensesUpdate.java | 2 +- .../operations/AccountingPaymentsUpdate.java | 2 +- .../operations/AccountingProjectsUpdate.java | 2 +- .../operations/AccountingRefundsUpdate.java | 2 +- .../AccountingSalesReceiptsUpdate.java | 2 +- 103 files changed, 20044 insertions(+), 352 deletions(-) create mode 100644 docs/models/components/BillPaymentUpdateInput.md create mode 100644 docs/models/components/BillPaymentUpdateInputAllocationType.md create mode 100644 docs/models/components/BillPaymentUpdateInputAllocations.md create mode 100644 docs/models/components/BillPaymentUpdateInputBillPaymentType.md create mode 100644 docs/models/components/CreditNoteUpdateInput.md create mode 100644 docs/models/components/CreditNoteUpdateInputCreditNoteStatus.md create mode 100644 docs/models/components/CreditNoteUpdateInputCreditNoteType.md create mode 100644 docs/models/components/ExpenseCategoryUpdateInput.md create mode 100644 docs/models/components/ExpenseCategoryUpdateInputStatus.md create mode 100644 docs/models/components/ExpenseReportUpdateInput.md create mode 100644 docs/models/components/ExpenseReportUpdateInputAccountingPeriod.md create mode 100644 docs/models/components/ExpenseReportUpdateInputApprovedBy.md create mode 100644 docs/models/components/ExpenseReportUpdateInputEmployee.md create mode 100644 docs/models/components/ExpenseReportUpdateInputStatus.md create mode 100644 docs/models/components/ExpenseUpdateInput.md create mode 100644 docs/models/components/ExpenseUpdateInputExpenseType.md create mode 100644 docs/models/components/ExpenseUpdateInputPaymentType.md create mode 100644 docs/models/components/ExpenseUpdateInputStatus.md create mode 100644 docs/models/components/PaymentUpdateInput.md create mode 100644 docs/models/components/ProjectUpdateInput.md create mode 100644 docs/models/components/ProjectUpdateInputBillingMethod.md create mode 100644 docs/models/components/ProjectUpdateInputDepartment.md create mode 100644 docs/models/components/ProjectUpdateInputParentProject.md create mode 100644 docs/models/components/ProjectUpdateInputPriority.md create mode 100644 docs/models/components/ProjectUpdateInputProjectPhase.md create mode 100644 docs/models/components/ProjectUpdateInputProjectStatus.md create mode 100644 docs/models/components/ProjectUpdateInputProjectType.md create mode 100644 docs/models/components/ProjectUpdateInputScheduleStatus.md create mode 100644 docs/models/components/RefundUpdateInput.md create mode 100644 docs/models/components/SalesReceiptUpdateInput.md create mode 100644 src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocationType.java create mode 100644 src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocations.java create mode 100644 src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputBillPaymentType.java create mode 100644 src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteStatus.java create mode 100644 src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteType.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInputStatus.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputAccountingPeriod.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputApprovedBy.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputEmployee.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputStatus.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputExpenseType.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputPaymentType.java create mode 100644 src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputStatus.java create mode 100644 src/main/java/com/apideck/unify/models/components/PaymentUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputBillingMethod.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputDepartment.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputParentProject.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputPriority.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectPhase.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectStatus.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectType.java create mode 100644 src/main/java/com/apideck/unify/models/components/ProjectUpdateInputScheduleStatus.java create mode 100644 src/main/java/com/apideck/unify/models/components/RefundUpdateInput.java create mode 100644 src/main/java/com/apideck/unify/models/components/SalesReceiptUpdateInput.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 57c414ea3..f67af446d 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 38254260-287a-40b6-9ac5-c2fcb654c9cc management: - docChecksum: 0e4766adfae26fad638e04dbba206b4f - docVersion: 10.76.0 + docChecksum: 4df0744ca714a8d3b6bf31216a28fa4a + docVersion: 10.77.0 speakeasyVersion: 1.806.0 generationVersion: 2.956.1 - releaseVersion: 0.52.0 - configChecksum: 025d16edaedf1bbb953906dfe3b6248a + releaseVersion: 0.53.0 + configChecksum: 30a0b378ee162bbeee7c416c6713d7e4 repoURL: https://github.com/apideck-libraries/sdk-java.git installationURL: https://github.com/apideck-libraries/sdk-java published: true persistentEdits: - generation_id: c6700326-ab5b-4416-a4d6-1067e68351c2 - pristine_commit_hash: cb9e1d1b7dd2a46a7e3c385ce8363a1afecb2434 - pristine_tree_hash: a370878df722e77cd7b3ef7a7eb464e23ee1aac8 + generation_id: 6a7aed21-d9b0-4e7f-a7b4-38d43b8b827c + pristine_commit_hash: 9221c10d7bb8717a9c059590871f8edf20a8dc57 + pristine_tree_hash: e5415bad2cccc69853431f638ece736b6db8a909 features: java: acceptHeaders: 2.81.2 @@ -719,6 +719,22 @@ trackedFiles: id: 08cc561043b2 last_write_checksum: sha1:19cc667d955231cc83d39f4d5a0b3d686af562d0 pristine_git_object: 473422e2c94b05c3b9cdc3716be1f19946f763af + docs/models/components/BillPaymentUpdateInput.md: + id: bae38f0cb5d6 + last_write_checksum: sha1:0957d86ca2e889e3ef76a334ae482e89875e4bc4 + pristine_git_object: e5de3e1d7a9e76ea908b228f4176ae667c8b4e78 + docs/models/components/BillPaymentUpdateInputAllocationType.md: + id: 67cd5cc72317 + last_write_checksum: sha1:9c7c54e32a10090fb13aada496043ec88626004e + pristine_git_object: ff15b9cb0c8c9cfff72e217c6a088cd77e89a8cb + docs/models/components/BillPaymentUpdateInputAllocations.md: + id: 3776308b0025 + last_write_checksum: sha1:737238acb76278e271268b717d0a445c66939635 + pristine_git_object: 62a3216cb88828d6610bda13501eb062215f16c3 + docs/models/components/BillPaymentUpdateInputBillPaymentType.md: + id: 7629fe221eab + last_write_checksum: sha1:d04fa1fdcaf6758e86563966cf82d45ca75dd83d + pristine_git_object: e810f2edadec0f497bc67b026cbba5d91d795707 docs/models/components/BillStatus.md: id: eafe6119b408 last_write_checksum: sha1:2c2f0b92bb3f97ab16de96e575a238a74d6eeb60 @@ -1343,6 +1359,18 @@ trackedFiles: id: c2f79149b72c last_write_checksum: sha1:a3ecc9060493cb15e1d65c32892ab2e41c3f23cd pristine_git_object: 852a5b1529b60df48fac50d436afe7d147369ea4 + docs/models/components/CreditNoteUpdateInput.md: + id: 3c728f33bfd2 + last_write_checksum: sha1:4ecdcce7cd2a888a9e6745edaf8d6a4afe8d5dea + pristine_git_object: 2a533547e50c379b6dbe3b3f456ac25a2dd26398 + docs/models/components/CreditNoteUpdateInputCreditNoteStatus.md: + id: 438f441661d8 + last_write_checksum: sha1:45f51d3754377f8161533a85343bdb77783cc11a + pristine_git_object: 1aaa7d21d574915de0691ab2b9067cc168a18b5a + docs/models/components/CreditNoteUpdateInputCreditNoteType.md: + id: 5c890d494430 + last_write_checksum: sha1:388ce021e4632dd376db0eca7999827fc51d2d61 + pristine_git_object: b791c6a0d46609d3549f25d7ee51c09726d08f15 docs/models/components/CreditNotesFilter.md: id: 4dbf5ec9a97b last_write_checksum: sha1:721c3edb14b49c6e0ddc3fe27e5b13c54e1cbeaa @@ -2019,6 +2047,14 @@ trackedFiles: id: c56758e52cea last_write_checksum: sha1:b142cc28998f8ca07cae4d98ddb7644a9bfa8089 pristine_git_object: 34e59d755adb129c5ec31c376223b21ad2a0dcc7 + docs/models/components/ExpenseCategoryUpdateInput.md: + id: e0bc054a0fda + last_write_checksum: sha1:14772ba971b7cf7b5d2f643857a0f8eafdcf8a31 + pristine_git_object: 1f845423f99e883971b2cf8e7fd0e4b00b2511fd + docs/models/components/ExpenseCategoryUpdateInputStatus.md: + id: 278d1aebde91 + last_write_checksum: sha1:78a56e7c8f025d9878c5ced3fed4232732f7323d + pristine_git_object: 1cc83b1856d536c67d7707c125f65f60196e5b91 docs/models/components/ExpenseInput.md: id: f0699569c2d2 last_write_checksum: sha1:66a0100925ef87dc889807fd5a965433c817a4bf @@ -2059,6 +2095,26 @@ trackedFiles: id: a1a7d2821493 last_write_checksum: sha1:adcbeb04be71d5e5440848b4143904d029b2c45f pristine_git_object: b3b629d0228e565e8d22c58eba304f55294c8a18 + docs/models/components/ExpenseReportUpdateInput.md: + id: c14f9cd6c902 + last_write_checksum: sha1:af1216e8725ac2d151a2449345c2ca8db24a5617 + pristine_git_object: 44d48f6981fc2043d9bcac7c3efcb65b870ff766 + docs/models/components/ExpenseReportUpdateInputAccountingPeriod.md: + id: d07a786994cc + last_write_checksum: sha1:ae694aa74cfa1c227d294955ef37b400c5e9a4eb + pristine_git_object: f76c7f52aae0efa2d7829e38b323c227a529c34d + docs/models/components/ExpenseReportUpdateInputApprovedBy.md: + id: 70daab0e7f74 + last_write_checksum: sha1:c97a798857d56b6dc6a46e7da134fa8d13e651df + pristine_git_object: f624e239aa8b43ea441b3d72e228feeee2acbe96 + docs/models/components/ExpenseReportUpdateInputEmployee.md: + id: b64771ec2bbe + last_write_checksum: sha1:441e95bc15e674fb8fb779fc22277a49d0ccbbd7 + pristine_git_object: 08a1cc00ce9316d64f01afec9aa50ef18776c0e0 + docs/models/components/ExpenseReportUpdateInputStatus.md: + id: 9cd5ca1e2ea0 + last_write_checksum: sha1:fefda298943a3438dfea36012bdf1915f6616b0e + pristine_git_object: 62762bd21aee076cb2bb5c812e817135425fe612 docs/models/components/ExpenseReportsFilter.md: id: 826ddf5ed017 last_write_checksum: sha1:461e7e3f9a68e74d1069e082abaf2dba1a3b3d1e @@ -2075,6 +2131,22 @@ trackedFiles: id: d15170ebf34c last_write_checksum: sha1:4e69995430414dc0d1dce2f8bb0ab89901417f5b pristine_git_object: 0f949a10546f206a0d8bdc2872ab287fa17120b5 + docs/models/components/ExpenseUpdateInput.md: + id: cf5d42de15fe + last_write_checksum: sha1:2c20c68729d57366779098a576a206592604ace5 + pristine_git_object: c82dd518349e289c5f10e4320592ad07388031cd + docs/models/components/ExpenseUpdateInputExpenseType.md: + id: 95ec6a470cf1 + last_write_checksum: sha1:f48a2a806a5f681738ee67f091b3ff4ac4d5c98a + pristine_git_object: 8080e0c55eddb00569dae83fdbe80c15a72ded38 + docs/models/components/ExpenseUpdateInputPaymentType.md: + id: ba587fcd79b0 + last_write_checksum: sha1:2d899d2791730c723683dbdf010cb29d044c8c6c + pristine_git_object: 14a6f0baf529fea306ba11958cf329e28e36d2a9 + docs/models/components/ExpenseUpdateInputStatus.md: + id: 21f348b4cc9f + last_write_checksum: sha1:5f5ae293143da1c863294391414ebf861a4f6256 + pristine_git_object: b3986534c426d84322e02a69ef1279abf810d29c docs/models/components/Expenses.md: id: 5f710e73030c last_write_checksum: sha1:13baaf81b652e35ac418733d29a9437fa1abd366 @@ -3603,6 +3675,10 @@ trackedFiles: id: 7f5f06f1cb92 last_write_checksum: sha1:e1d3112dc4b52b79af5d3483424815ff9db87577 pristine_git_object: 3c444a0ccb665ac600cfe6d05c336c12aa6156a2 + docs/models/components/PaymentUpdateInput.md: + id: a9f8d8c95cfd + last_write_checksum: sha1:c804544efe281f04008281c2121079c6e3052856 + pristine_git_object: 7a1626cfeb2e54d6ac97bdc30516c8007ca8240e docs/models/components/PaymentsFilter.md: id: f6689fee2b35 last_write_checksum: sha1:7015beedaec85d48b17b42d026f84f567c0fb3d1 @@ -3735,6 +3811,42 @@ trackedFiles: id: 7d45b8c8da26 last_write_checksum: sha1:8211457df331a98eaa9e5906f26c5947833ecad6 pristine_git_object: 8c4ecf09b01a76e81413521f0956ebddfecf9e4c + docs/models/components/ProjectUpdateInput.md: + id: b588ff09a9e0 + last_write_checksum: sha1:590413aba346782f7c60369ebbccdc43d8911839 + pristine_git_object: f01f04da90f3dda0f72349a88ef607806d140b39 + docs/models/components/ProjectUpdateInputBillingMethod.md: + id: 23356995ea70 + last_write_checksum: sha1:279dcef141c3bd72bf9e310572ec78e3d44dc39a + pristine_git_object: 6d1d1242e9cced1364a12c2c2f1c16fec7407830 + docs/models/components/ProjectUpdateInputDepartment.md: + id: ddded5da4bbb + last_write_checksum: sha1:e754c79a2335629a3eddd8f00a17630d4968f4c1 + pristine_git_object: 43b2b9d25f03b7b3e80bf3cecdc98b7e34935cc4 + docs/models/components/ProjectUpdateInputParentProject.md: + id: b96ffdbb81b9 + last_write_checksum: sha1:47d07e7fbca88845d9fdbccab94e7fce0197b8b8 + pristine_git_object: 3edf664450e24fad33b89faa0c93675f607098e6 + docs/models/components/ProjectUpdateInputPriority.md: + id: dec6194344a1 + last_write_checksum: sha1:5d675398b9f7fffe9696f5d89c93a3540b706a20 + pristine_git_object: 41aed69cd765d161fc16a5d40e44a2765314a289 + docs/models/components/ProjectUpdateInputProjectPhase.md: + id: 623ec7b88f2e + last_write_checksum: sha1:0b83110752ac5af6fc472d9a11bc3c5e30c9a6aa + pristine_git_object: 6c4ec2b9533120720212625f237a67195cbb4d35 + docs/models/components/ProjectUpdateInputProjectStatus.md: + id: 8fc82ec26f7a + last_write_checksum: sha1:72784f4dbb1259934c97abb9c33644ddcb8b506b + pristine_git_object: 45901e58ebcc4b0b94bfaefec82e8e3f79c0da8f + docs/models/components/ProjectUpdateInputProjectType.md: + id: 8ef1f0a393eb + last_write_checksum: sha1:61a0fe83cd3901527877932ef5b7db1dc7884b86 + pristine_git_object: f33dff4db86b1ca40f6ee4a768e8bde75aa574c0 + docs/models/components/ProjectUpdateInputScheduleStatus.md: + id: 61938b417d8e + last_write_checksum: sha1:4f9a2c7a84055ee15bafe735b394f1705250645e + pristine_git_object: c9acd4a76884cb1ddc73f13aada19431a7efaf60 docs/models/components/ProjectsFilter.md: id: 9becd2fde863 last_write_checksum: sha1:618dc14379960860702c9e9fba20d296321d8e94 @@ -3831,6 +3943,10 @@ trackedFiles: id: d7b997c55c6e last_write_checksum: sha1:3cb852accad6dd4fa1726decc002818869a448bf pristine_git_object: 2a61dd345e54a942ec6cc8fde3f60d4a341ca001 + docs/models/components/RefundUpdateInput.md: + id: 22f3ab4a145e + last_write_checksum: sha1:3bea9ccb500fb94aaf33b9869614404985783913 + pristine_git_object: 14446ef87be281a3817b5fe7d6450bc9f1e0c0d7 docs/models/components/RefundsFilter.md: id: 4768fbe80bcb last_write_checksum: sha1:5f85237aa48aef410a4385a0d14d7da1bdd1b011 @@ -3903,6 +4019,10 @@ trackedFiles: id: 289993fd2c41 last_write_checksum: sha1:29907a5f05d7575080551fa0471d4c95ac7ce131 pristine_git_object: d6f86003c3eb1f8b75ffc6aea9727d949efb27b9 + docs/models/components/SalesReceiptUpdateInput.md: + id: 6b140f0eef3b + last_write_checksum: sha1:45533a5d408e18d3940cac430c0e67d7a9faeb10 + pristine_git_object: db670740bd49e2d13f2f175cc541484010b1158c docs/models/components/SalesReceiptsFilter.md: id: 8940ebe46960 last_write_checksum: sha1:bdb0647be5dae94cf0ba41aaaeb4180bc7a2cec3 @@ -4985,8 +5105,8 @@ trackedFiles: pristine_git_object: 03698cb88e3c83b4d5f9afce4bb665caf66fc47b docs/models/operations/AccountingBillPaymentsUpdateRequest.md: id: 5050a262429c - last_write_checksum: sha1:e14122fc3a583d858377704de24f21b4c0572677 - pristine_git_object: 66a5f2ee71bc708024ccb0c5f6d62d19f522c73d + last_write_checksum: sha1:9f093dc5e73cfd45f36c37a496296bd30a6b3ac0 + pristine_git_object: f0003d0f8ec30e79da1ed9c855b029305673c5b1 docs/models/operations/AccountingBillPaymentsUpdateResponse.md: id: e09ea569ac91 last_write_checksum: sha1:92e632a50ebf2c1f2e6b42d281e654f318e5d3c6 @@ -5113,8 +5233,8 @@ trackedFiles: pristine_git_object: 3c4f43a10fe7bc9b77dc1841a3c268ef67c72157 docs/models/operations/AccountingCreditNotesUpdateRequest.md: id: c488d87b76e6 - last_write_checksum: sha1:b67ec0786ead07ca108c24e02a00aed08d446a8d - pristine_git_object: 30222faa84f8b992abdbe6271a86316c17f25cbb + last_write_checksum: sha1:7ca9be313cbef7b3cff3bb294d536710f65fb2c8 + pristine_git_object: d5abb01df5dc8edcf674c650560bb93caab77ea8 docs/models/operations/AccountingCreditNotesUpdateResponse.md: id: 35bb00f5b90e last_write_checksum: sha1:c15ede529631229811064f46d9a82440d9427c09 @@ -5281,8 +5401,8 @@ trackedFiles: pristine_git_object: efacca89ef57af62ef66c2df01db2a21da11d9b5 docs/models/operations/AccountingExpenseCategoriesUpdateRequest.md: id: 5797c9625113 - last_write_checksum: sha1:5d1d6b4e8417d7e2fd379251d5a95fb6661ccbed - pristine_git_object: 6333d5a1aee17ff45cea075013feca451c5431d7 + last_write_checksum: sha1:775b122af11d05f814567717a329dc9ccfbf013c + pristine_git_object: 7745a96f18746d82297c27bc0cb6c2fbfae888fc docs/models/operations/AccountingExpenseCategoriesUpdateResponse.md: id: c68f6c642459 last_write_checksum: sha1:30cc7a321456bf20e6b55eba606ee97f69ba8d8a @@ -5321,8 +5441,8 @@ trackedFiles: pristine_git_object: 0830b526bea6b2ae5449d78d67f385f5c77f0077 docs/models/operations/AccountingExpenseReportsUpdateRequest.md: id: 0c0b43c11e04 - last_write_checksum: sha1:c38fc08399b277edc1f2ff6a0f01e27de504ea67 - pristine_git_object: 270a6095713556bff465055ffe493954e8b7fe84 + last_write_checksum: sha1:987880d725cb307da5cfc84b812900f6364e13f4 + pristine_git_object: 8f3374d58a2cdbe15f34c77ac3d65ea8540e95fd docs/models/operations/AccountingExpenseReportsUpdateResponse.md: id: 68c6fe8e75eb last_write_checksum: sha1:42eb089067d9cd707841b28d70b13493725280e5 @@ -5361,8 +5481,8 @@ trackedFiles: pristine_git_object: 5e3e152b063bebeea918409b1456b92507aa7a55 docs/models/operations/AccountingExpensesUpdateRequest.md: id: 25fe19c1ebfb - last_write_checksum: sha1:a15501d0ebd11d035aaca39da9a0ba8c5297a3f6 - pristine_git_object: 580c3d0c44018f126fc52faf60b10df65d348216 + last_write_checksum: sha1:833d4eb923400e8aaadf9ba118881d3b082d43ad + pristine_git_object: f50089f8177213dc9868b1fcd3762b43c4e36bd0 docs/models/operations/AccountingExpensesUpdateResponse.md: id: 89196a3f54b2 last_write_checksum: sha1:77e2eb54dea18b3ace5400e290a7913207750bca @@ -5761,8 +5881,8 @@ trackedFiles: pristine_git_object: 3c3614ea4a25d9a03e4d96e97815ae9c72f0872c docs/models/operations/AccountingPaymentsUpdateRequest.md: id: b11834761b5c - last_write_checksum: sha1:91dafcaaac97652f64165b0404cc901d102fbb27 - pristine_git_object: dd15b8da2f2fab8cca0ee4c87cfd22143cb11892 + last_write_checksum: sha1:5c407dfce1112c0bda1b8f4f4969b71f23f5f5f4 + pristine_git_object: 1352125bc1198e8914ead0733ebb8d39ead4a52c docs/models/operations/AccountingPaymentsUpdateResponse.md: id: 976c8f996203 last_write_checksum: sha1:356b094125764dae21280ef2a832d74f16a49c18 @@ -5809,8 +5929,8 @@ trackedFiles: pristine_git_object: 1456d6f5093117f2ced1eb7b4b4c497bbfe6b02f docs/models/operations/AccountingProjectsUpdateRequest.md: id: a5067414bf0c - last_write_checksum: sha1:f9637d01109b15b6ae2804b3fbea09252988c0ea - pristine_git_object: dbcab5813907dc1b317f0446b946cb2ce35a993e + last_write_checksum: sha1:7c414efcaa20e85069cdf681ab7aee359ed40b20 + pristine_git_object: ab6442ee4cbe978f670776ea4e6cf1890b606fb8 docs/models/operations/AccountingProjectsUpdateResponse.md: id: cacde7e5da24 last_write_checksum: sha1:2b747a24511853e14df6884e5e4974b9dbaa42ed @@ -5929,8 +6049,8 @@ trackedFiles: pristine_git_object: ed47cf7986c61217144b03611b03ad31303e3ba3 docs/models/operations/AccountingRefundsUpdateRequest.md: id: 19f12766df2a - last_write_checksum: sha1:22c4172e875b5bbf5c4486e3461f43984a2333f6 - pristine_git_object: 45e5744eb54cea4fdc890428b188011330d8055a + last_write_checksum: sha1:677b73b1129c2336d657697a3093a26b51ca00fc + pristine_git_object: 160cb1fe38f3189098ef4141df8ef34d3d6da77c docs/models/operations/AccountingRefundsUpdateResponse.md: id: c5584828abcf last_write_checksum: sha1:de6da02608e5d33995e274e761b66c778949d0b6 @@ -6009,8 +6129,8 @@ trackedFiles: pristine_git_object: fd9eef56e0a8ca7017683762e668b571758d509f docs/models/operations/AccountingSalesReceiptsUpdateRequest.md: id: 375994fad920 - last_write_checksum: sha1:1404400d72e7ccb0bf0dc5af6191726bfc08ddef - pristine_git_object: d665b34ed85d110447b97a0a5c98912a38fe4dbb + last_write_checksum: sha1:405d2f9576600850eb5ef53e4d9a0b56395a2e53 + pristine_git_object: 7c54bb2a0f61977c58c4de52bc39a80ebab412a9 docs/models/operations/AccountingSalesReceiptsUpdateResponse.md: id: 1fd8262bf739 last_write_checksum: sha1:ba49dc5bcff07ff88861d39834857aa47802bea4 @@ -7873,8 +7993,8 @@ trackedFiles: pristine_git_object: 296d9da7b3cdf61f0cf7518bab368439f59e3ca3 docs/sdks/billpayments/README.md: id: 9436cf9c44bd - last_write_checksum: sha1:a7fc31ede16f6f72b98451b334dad87a2d1814ac - pristine_git_object: d5ff232be7de80c22958e46eb54306231cf18eb6 + last_write_checksum: sha1:f3c9ec4a8c094ef2a395c829fb5b88bf44bad821 + pristine_git_object: 1593d9cd7253b7e3c087beb795f5fca720049048 docs/sdks/bills/README.md: id: 2a9c97966ab7 last_write_checksum: sha1:9c87bdcb563e240b4b1885c239bbbcc7c55f2ebc @@ -7961,8 +8081,8 @@ trackedFiles: pristine_git_object: f35607e2868c1fe83735d4e8c9ff1ddb7405a880 docs/sdks/creditnotes/README.md: id: 2d6d27cce955 - last_write_checksum: sha1:de6143abd00f0e8fa674ebfbccc50410c62784cb - pristine_git_object: 0102fea85c306bd1760aeb903660e8013c025280 + last_write_checksum: sha1:4aefcface095ff3299bda106c851686c4ce477be + pristine_git_object: 60d1d7e44d48a8938f4b4e57de36fe93c4050674 docs/sdks/customers/README.md: id: 9332759cffc2 last_write_checksum: sha1:df705780e0d03693f0b00301949d0496294b99c6 @@ -8009,16 +8129,16 @@ trackedFiles: pristine_git_object: 7b97063df7a1fff8c57b24b9701a6ce3a9d1742c docs/sdks/expensecategories/README.md: id: b3b488c373df - last_write_checksum: sha1:e29a185eec430620d30f9d8dd8dbbeaec76565b8 - pristine_git_object: 53e0acf70a68264901ccb38b6965302cfe30707f + last_write_checksum: sha1:a874fe06a5e1604c77c817da82cf90898ab980ac + pristine_git_object: ab62354e20a5b0e9899258b48534e4297af54f8a docs/sdks/expensereports/README.md: id: bd1c9bec7278 - last_write_checksum: sha1:a39d751b9847f9d2d1ef87045d5def62d459b01a - pristine_git_object: c809f87775d15a0a927eef47b950095ab6a57150 + last_write_checksum: sha1:8e7b2bb7692231a9f9448e233b916061be12f302 + pristine_git_object: 5b7731fa0eff85c78c5ba713d21077d193f3cb60 docs/sdks/expenses/README.md: id: 5692d1aab79d - last_write_checksum: sha1:0dc76a57ce80b110f14848abce6a6efb1345c275 - pristine_git_object: d8d6d6242f19484907affb294c6e3f848bbe0393 + last_write_checksum: sha1:0fc406f891ea5de5100e558d6b95b15f7ec167c6 + pristine_git_object: 828feebe4020fb93b99b433e8d076d5e0a39ff53 docs/sdks/files/README.md: id: e576d7a117f0 last_write_checksum: sha1:b3ee2762037d3a9d446eeb6f20af90b62f924c8e @@ -8105,8 +8225,8 @@ trackedFiles: pristine_git_object: 29c0580e57e521b13c64d3ceb9c6b2949da2e05a docs/sdks/payments/README.md: id: 0ddb15ec8c20 - last_write_checksum: sha1:287ae46be63225a7d6cfbaa860a22ea431775e84 - pristine_git_object: e4cbe31940b3a81ef055d8dbf5f84332352259eb + last_write_checksum: sha1:4a9d205c4092200640818304832683d6cd9a9008 + pristine_git_object: b5a7b2eb3ef33444c6d4a754d98a29bd8abf048e docs/sdks/payrolls/README.md: id: f6fb115a2746 last_write_checksum: sha1:f503e6fb78b13583bff00967122f847c24b6d80e @@ -8125,8 +8245,8 @@ trackedFiles: pristine_git_object: e2e60736c1d3203969ed2305e5d5e9ba78ce5d34 docs/sdks/projects/README.md: id: 1c5f71754e17 - last_write_checksum: sha1:3a3b005f6859a12280380f0b686a07e9d13de2a6 - pristine_git_object: 109cc0024fa68a3b4029d495ddcebb2c008bba3b + last_write_checksum: sha1:155d12b3fd8e0984bf5f9473ce9fbe1854a5f3de + pristine_git_object: b050505441cd0225a0cf5db57fad4f167ce00abc docs/sdks/proxy/README.md: id: 2c72b780f1d0 last_write_checksum: sha1:a4bdcd06b79a05abc9d0bc14dd6fb859eb77bf2d @@ -8141,16 +8261,16 @@ trackedFiles: pristine_git_object: 49af53dc0385d6f6f9ac463cfdbf8bce9d0a1782 docs/sdks/refunds/README.md: id: 451a9838a921 - last_write_checksum: sha1:bfe8f713fd4064a83405fbb98bb04c45e0d1216e - pristine_git_object: 48afac54af55f78a6d798d37b7a909f91732e3b2 + last_write_checksum: sha1:4262c41290eab84bcdb4d6c29d05f461d9a9cc80 + pristine_git_object: 04818d3c4a880e96dd8fc1b4ae0ba4b61afccb43 docs/sdks/salesorders/README.md: id: b59874ba3d1a last_write_checksum: sha1:4d7371ccacf401642e0cab77121d12f15afafa3a pristine_git_object: 4bac72ccce0e13cd9029f3e21be3074a8c0e4c07 docs/sdks/salesreceipts/README.md: id: 70fd847a91a7 - last_write_checksum: sha1:2f72f097a970615b6ee9c6c609f1d6f398e4f952 - pristine_git_object: ea184c2f3c866822619529fe0b8b5ea45586ce66 + last_write_checksum: sha1:16de97092db1c2caee74ae7c706a0dd3562a0417 + pristine_git_object: 9fac2ab0ad51748d9ece543fefddb48e04dfdf1f docs/sdks/sessions/README.md: id: 57ad62844f79 last_write_checksum: sha1:be24445eedf56ddab29506ce11693e9a0c436c0c @@ -8209,8 +8329,8 @@ trackedFiles: pristine_git_object: c755c6aa377f358344e761e9cc3e7b67bc1fb479 gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:08fcaed7c38a7f94e6c6af330269c87b55f460d5 - pristine_git_object: fa0d12c684dc8a51d04cce4f7a6c25ff3af790aa + last_write_checksum: sha1:76bbc75e0d4742cc304bde82d919989e9c1517df + pristine_git_object: ebe78317704f42a014836019f544a5bc6549ff91 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -9077,8 +9197,8 @@ trackedFiles: pristine_git_object: 7296db7ebcdcff7ee348d1f993fc4aa2a7e6c145 src/main/java/com/apideck/unify/SDKConfiguration.java: id: a2b330a87142 - last_write_checksum: sha1:c47a739c6c9e4511569aeadcd8016488da53c46b - pristine_git_object: 44509c0eb082a9fedda074589b59fef8d5e42f33 + last_write_checksum: sha1:b924ded5abaf1351718b8e5c7a0be00a8078fa36 + pristine_git_object: 7196123adc3c880402efea4bef4f8c93ca91dc53 src/main/java/com/apideck/unify/SalesOrders.java: id: 065b0fd99f1f last_write_checksum: sha1:263495ead26adefc6a55b3380563b052158968b0 @@ -9819,6 +9939,22 @@ trackedFiles: id: f4ecefb3f6e0 last_write_checksum: sha1:8ff77c45980087a9df68fdfe9ea9bd72cd745c1a pristine_git_object: 33404c42ce045202c7f27a99677151ada4ec5001 + src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInput.java: + id: 288f2c90a7ab + last_write_checksum: sha1:237ad6c4b9912d40b79d464a73b355a1c5e07a56 + pristine_git_object: c5ade824bfb6c102c9a5e208e5d711909b426382 + src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocationType.java: + id: a72133c63ba7 + last_write_checksum: sha1:3bc002e9e887f3d2ab7a47494225e8fdb89bfb92 + pristine_git_object: 9966e68e004b8d8ed171e5f9b28247b50d381f09 + src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocations.java: + id: 26c77d6a4a34 + last_write_checksum: sha1:5d74dce2e6d9b8133ac7b4cf9955229b898f983f + pristine_git_object: f38b2457ade0ffdfad0f666ae186ae0173dd5b27 + src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputBillPaymentType.java: + id: 0183506ee7e6 + last_write_checksum: sha1:2a8e3af4f2fb66f0d32c4bdabce2e1c32d86a941 + pristine_git_object: eb2bec3f7b31bcffd56fcc3e609b6db08d9c3b82 src/main/java/com/apideck/unify/models/components/BillStatus.java: id: 748d146b2c38 last_write_checksum: sha1:33d0a4bf286fa269e22e7e51e277c032fc40d1f7 @@ -10443,6 +10579,18 @@ trackedFiles: id: c9d08e857604 last_write_checksum: sha1:bc8f44c722fb5a34e6ebb39d02982ef7b0613c24 pristine_git_object: e47a548f632abd85ec9e48d6251ce78c9293d633 + src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInput.java: + id: 538ea9189126 + last_write_checksum: sha1:2851efb8d09423290a8aae6c6294152627c27fe4 + pristine_git_object: 04e65c110e492517da5cbd297a048f60999eb203 + src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteStatus.java: + id: 0c1d8080915d + last_write_checksum: sha1:4493b000b25848133b548144bff7001467eefbeb + pristine_git_object: bc667b669d94b47135df49c2c47ba410e0637ea9 + src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteType.java: + id: 0a2cf872ccb4 + last_write_checksum: sha1:df24204211943b096afabe1a8dce7b3e24548bf0 + pristine_git_object: 58be7d0dfeeb66c97d615a217c80dc3732cb220d src/main/java/com/apideck/unify/models/components/CreditNotesFilter.java: id: bb84f996125e last_write_checksum: sha1:8219e3c9cbe247b8074823d6e968f0052133ca1d @@ -11119,6 +11267,14 @@ trackedFiles: id: 4ef0a2659bad last_write_checksum: sha1:296cde4e512f6b6cc6dab9ec9f0a6a7c1f6f84d5 pristine_git_object: df5de48132229c47af85339817f834e0eec1bd0a + src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInput.java: + id: a027ddd7ddfc + last_write_checksum: sha1:d04f59dd62fbe9900e856023846b0f7e4901e162 + pristine_git_object: f55cef088325d821d07766d7da29775868ef004a + src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInputStatus.java: + id: 5a683bdd3417 + last_write_checksum: sha1:c2737cf5689f1244caa57e9ed2f7e5e324ff4ee5 + pristine_git_object: dae9e7c31428e4fb5836b984aafda25eaa2b511f src/main/java/com/apideck/unify/models/components/ExpenseInput.java: id: 3981ac315d80 last_write_checksum: sha1:f49ff761bbaf7357818eecedc21191711183a7ca @@ -11159,6 +11315,26 @@ trackedFiles: id: 80662c4e9578 last_write_checksum: sha1:3f94e0edb5e9504c1383153fc131461e53ee3369 pristine_git_object: 2fcbc308a453093f4d573d8793e871320a92d418 + src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInput.java: + id: 3ac456cbe928 + last_write_checksum: sha1:2e3e651f93764e876ab32b01a1195bd4e3481d6b + pristine_git_object: 6a1d33c6864e47f3af0398627d9c6f699ff23a22 + src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputAccountingPeriod.java: + id: 5b2138192680 + last_write_checksum: sha1:e6895beff8ddde797520d30ec803d267abbb92ec + pristine_git_object: cc9e79cdbfa28eba70f5ef91ea936f7da2d82728 + src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputApprovedBy.java: + id: 49398d6cf7c8 + last_write_checksum: sha1:356a310da0329a13f0215eb3dda570a2a8dff8c6 + pristine_git_object: 3747522df2c1c55dc1a5eed0e6ae20d99e42789d + src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputEmployee.java: + id: 6194dda6626e + last_write_checksum: sha1:8397aa599993c1ece474d95112e3fc5e2cdd24a3 + pristine_git_object: c76ccde65991d1fa2af18d81cf53508c38bf3338 + src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputStatus.java: + id: 4e854c5b070b + last_write_checksum: sha1:dd29a558f405a2bb70a60be34b1afb3468ab7330 + pristine_git_object: d73bd80483708eadf99b0dc958211cfec0f47870 src/main/java/com/apideck/unify/models/components/ExpenseReportsFilter.java: id: 2dff48a4295d last_write_checksum: sha1:e844867ef157d97f2c6c98a593065b714d1511df @@ -11175,6 +11351,22 @@ trackedFiles: id: eaa714a01736 last_write_checksum: sha1:47aae2a275d57a9892afa4b8d76a0e80c0ac6649 pristine_git_object: efd71e1c00294f9fa7212a3f30f2c765f96e914b + src/main/java/com/apideck/unify/models/components/ExpenseUpdateInput.java: + id: bd6a67fa1360 + last_write_checksum: sha1:154b0dbd7024235771e32903d2d51ea63b6fa564 + pristine_git_object: e539e975a1eb97d43c1f875e798e44137e738c87 + src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputExpenseType.java: + id: 25b422d7eee8 + last_write_checksum: sha1:014cdd6fbe4c80efc32c7526599757f604d88229 + pristine_git_object: c1abbf209b255d2d7041a512a8aded142c115d7d + src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputPaymentType.java: + id: f97dd2e11467 + last_write_checksum: sha1:356a849117cc77a2ab966325d305e95ea2794db8 + pristine_git_object: 3867b0ad10f839231ede8c4a2dcb2f53fdc72ecd + src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputStatus.java: + id: a0f2ab426dcd + last_write_checksum: sha1:a2949a6c413d1e4dc7781a120265270cdf416db3 + pristine_git_object: a3ef5fee39b5b64b02d39597e2f2b14760613c97 src/main/java/com/apideck/unify/models/components/Expenses.java: id: 430803c690d3 last_write_checksum: sha1:d51838164d90f7caac2b445a73e8b8228d03021c @@ -12707,6 +12899,10 @@ trackedFiles: id: 44e28b223303 last_write_checksum: sha1:90a4826a6b966e33bd53875689bfa078fbf43efb pristine_git_object: 4f9c1044a6f44398c63667231eb852946d5816e9 + src/main/java/com/apideck/unify/models/components/PaymentUpdateInput.java: + id: 37aeb672bffd + last_write_checksum: sha1:820f9ccc22c6095ba63ba3f33055efb22e1ace20 + pristine_git_object: 57d807c972fc845d783e13503cf7d289144ad220 src/main/java/com/apideck/unify/models/components/PaymentsFilter.java: id: 8eaedee76441 last_write_checksum: sha1:65397271f9327e54115dd89abe5531314c29fdbe @@ -12839,6 +13035,42 @@ trackedFiles: id: a509e390607d last_write_checksum: sha1:3f6f4fbb563bc316fe76f315497c7b718de04d3a pristine_git_object: e21a0f235e23c446ae25bd59aa209e5a0c23c0b5 + src/main/java/com/apideck/unify/models/components/ProjectUpdateInput.java: + id: c50cf9e21f7f + last_write_checksum: sha1:24f062bba45e777fbe5707d83647f2b19de1a833 + pristine_git_object: 01c06e841ee894c1e64bdf34cd18021c658f772a + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputBillingMethod.java: + id: a7233d2c1358 + last_write_checksum: sha1:a04bd179c02b4b9af6539d59e9c1c1349b15bde8 + pristine_git_object: 3dffc0a26af1aa3c73c77e6e8616926502e9cca7 + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputDepartment.java: + id: 0b9e9fead981 + last_write_checksum: sha1:461fa234235611b1d09b8b3fbc69736943799a90 + pristine_git_object: 181218a960f1d0df15fea20acc9fe463c9a6cd84 + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputParentProject.java: + id: c7209072c654 + last_write_checksum: sha1:94c810bbdb5d1a73d445c5f298383bf642aa2589 + pristine_git_object: aac08ea1404f5e5980b463a1daf3b7c6849580be + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputPriority.java: + id: 84688a64569d + last_write_checksum: sha1:abbd2cce9dc5031d162c9f46bf98b1183cd80474 + pristine_git_object: e2731cd8d0cc64febca8dc264164dedb0274eccd + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectPhase.java: + id: 7ec37ed44cfc + last_write_checksum: sha1:7189abdaa2d94ceff6ead8676c9363d2e8a73882 + pristine_git_object: 42cd222995f2efaa4b5757d725158602a859b16b + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectStatus.java: + id: 030e0ecebc1d + last_write_checksum: sha1:1701c1aba088c5b3d70a5d51a82ad80677d861e4 + pristine_git_object: 44ee7e13be36d36c1301f32b01ff3aa3de76b42d + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectType.java: + id: 1825bcab99fb + last_write_checksum: sha1:50d566c4706b94558dc6ef6cc29770b87f6dc485 + pristine_git_object: 4f6bb66c5269e9b33b5b00dcecd7d08cb8162d96 + src/main/java/com/apideck/unify/models/components/ProjectUpdateInputScheduleStatus.java: + id: bba05aaf28eb + last_write_checksum: sha1:f8926a6929f2b70b4f99d95f66feeedc4d12ffe3 + pristine_git_object: 115c070cfc8b92a279ec01ac6b46232d652153cd src/main/java/com/apideck/unify/models/components/ProjectsFilter.java: id: 360cef193bb9 last_write_checksum: sha1:9b7a214e514a6a9df6a258c9ee875cb54ee56b61 @@ -12935,6 +13167,10 @@ trackedFiles: id: d35609529240 last_write_checksum: sha1:37ca7ee4084c56acc766972b7619754154bce431 pristine_git_object: 5278ba41f280c72ae16b79921c446c73ac63b4c0 + src/main/java/com/apideck/unify/models/components/RefundUpdateInput.java: + id: c76a2b5cbc0b + last_write_checksum: sha1:6a221231d293d7f22ec327c224811cdceda9a5ac + pristine_git_object: 3bb6568da1773b021d7ce1471e5478943c8942fd src/main/java/com/apideck/unify/models/components/RefundsFilter.java: id: 94a3dc02d11d last_write_checksum: sha1:f8b031320dc9a7f8e83f8431ed678c3f10b19e47 @@ -13007,6 +13243,10 @@ trackedFiles: id: 67391b3d29f6 last_write_checksum: sha1:28390877048ba1a518ec495846dc2945adf0a238 pristine_git_object: 18eb21ae81f9525132b4926628d90196b1ea24c0 + src/main/java/com/apideck/unify/models/components/SalesReceiptUpdateInput.java: + id: 5b9279d021a5 + last_write_checksum: sha1:4fa2a95b3c1fe9f3c07a27f44f4af8eff3071b14 + pristine_git_object: 3086ae6cfb368a9f777203e9375fd26029f9b3b9 src/main/java/com/apideck/unify/models/components/SalesReceiptsFilter.java: id: faa5e2f836cc last_write_checksum: sha1:45cf8050f1036cba86add4182b3b1af001d969d2 @@ -14245,8 +14485,8 @@ trackedFiles: pristine_git_object: 89284d21f9cb1286f0acb2f46b3ed4acfa0449dd src/main/java/com/apideck/unify/models/operations/AccountingBillPaymentsUpdateRequest.java: id: 39fdfe324d81 - last_write_checksum: sha1:5f23c85ca93c47aa7a7dd483f4ca4ad7f0eecb0e - pristine_git_object: 5523fddbb4f3c57a340d70a9d1e363376fddf3ab + last_write_checksum: sha1:f867584a6a8d756dc6f4b2ea402e79d3630d008a + pristine_git_object: 20b193b247b5753469ff62a4ac6ba94b381ad6ef src/main/java/com/apideck/unify/models/operations/AccountingBillPaymentsUpdateRequestBuilder.java: id: 8d53b9f37b53 last_write_checksum: sha1:ea15f357edd905d5df4cdf954742dbb587e2331a @@ -14437,8 +14677,8 @@ trackedFiles: pristine_git_object: eb1ab8a307c29382be220e85eb5c7bffcecc0466 src/main/java/com/apideck/unify/models/operations/AccountingCreditNotesUpdateRequest.java: id: f861f54135e7 - last_write_checksum: sha1:129b9611ce105b982c77597e8ac37fd1bf1f68b5 - pristine_git_object: f652249be8d04dff519623b75399e02de986fd84 + last_write_checksum: sha1:c851e5fffb3d115b952514c423f477acfa502844 + pristine_git_object: e98df55eb3d4ed7ed08a52d9ec1dd3009277ef00 src/main/java/com/apideck/unify/models/operations/AccountingCreditNotesUpdateRequestBuilder.java: id: fe23f2ed24e8 last_write_checksum: sha1:6ce0f76e1b9321c246eff52efe335b1e4473bcbe @@ -14689,8 +14929,8 @@ trackedFiles: pristine_git_object: 2f01b2d53740db3aaf5c1a878a26c16ae5332b9a src/main/java/com/apideck/unify/models/operations/AccountingExpenseCategoriesUpdateRequest.java: id: 5a76350c387e - last_write_checksum: sha1:31056582b1ee9c1c1cc96bfdc2822c56b72d9a15 - pristine_git_object: 9a3155ad23239443b0352d283f8ac7ce629bc18d + last_write_checksum: sha1:c4f945370e3d93ad67561fd282a43d003a1b11c0 + pristine_git_object: fbd5bfe75230819b8709a4f0bdfb8b2871137486 src/main/java/com/apideck/unify/models/operations/AccountingExpenseCategoriesUpdateRequestBuilder.java: id: 6fabe3dfc5fb last_write_checksum: sha1:4f14a070c0b1acefc1407e71b9d81d6e027d4fda @@ -14749,8 +14989,8 @@ trackedFiles: pristine_git_object: 082170911a6d098867e746d3b21f906d538c5f90 src/main/java/com/apideck/unify/models/operations/AccountingExpenseReportsUpdateRequest.java: id: 3c4bce7af4e2 - last_write_checksum: sha1:57b26b5097fe676ee18f1e3899d4b1322d66c98f - pristine_git_object: 03034ba9abca15e476f8dec76e04d186833a5270 + last_write_checksum: sha1:e03b23e89488d23437d268b30d1c6092e22024e4 + pristine_git_object: 5e29df43f2681d64adbf8be9f5b24339ef833ee1 src/main/java/com/apideck/unify/models/operations/AccountingExpenseReportsUpdateRequestBuilder.java: id: 4afa2e98a90c last_write_checksum: sha1:2d867ae3620277f951083fd27947ea8c973d3d24 @@ -14809,8 +15049,8 @@ trackedFiles: pristine_git_object: 007eda1e92644be37b3f6bd59b99edadd5149064 src/main/java/com/apideck/unify/models/operations/AccountingExpensesUpdateRequest.java: id: 5614f884db95 - last_write_checksum: sha1:e12aacee85d39fe93f1739e5d0e4cbf349750e4a - pristine_git_object: c5e3b8ec82ff139783dbadb127dd05486d3e09c2 + last_write_checksum: sha1:04c4ff8c12c3a1583932b0b7edd6ef6f174a754a + pristine_git_object: d701d6384981f9ed0afab96ad16c337f23e8fa7c src/main/java/com/apideck/unify/models/operations/AccountingExpensesUpdateRequestBuilder.java: id: 03c696cc55d4 last_write_checksum: sha1:16173bb271a80de8bdb6df43bad9ea7614d9079b @@ -15409,8 +15649,8 @@ trackedFiles: pristine_git_object: c7b2ff7e17b6a6af0584ed6a4bab7538839f50a5 src/main/java/com/apideck/unify/models/operations/AccountingPaymentsUpdateRequest.java: id: 5208982a7cf2 - last_write_checksum: sha1:936ea9b39063fae636c4c22ff81e1897e3e31058 - pristine_git_object: ed3806da652f9849b226ac38d0792c3f48511f61 + last_write_checksum: sha1:20932116efe6adad2a9d196c134142ed789fc682 + pristine_git_object: d36c2403f62cfdf697bf55579da631dd4130b04f src/main/java/com/apideck/unify/models/operations/AccountingPaymentsUpdateRequestBuilder.java: id: d7a27d687a55 last_write_checksum: sha1:32e43ecc3edd190a5674288a9631b3915daa2cc7 @@ -15481,8 +15721,8 @@ trackedFiles: pristine_git_object: 5f8a5351bc1748464e6048ead055fe936ecbcd77 src/main/java/com/apideck/unify/models/operations/AccountingProjectsUpdateRequest.java: id: aa47cb140dd7 - last_write_checksum: sha1:dfa435c88a7acdb6974d3a9e4f7a829aec3884f7 - pristine_git_object: 7e3bb96aec81825e2181499347721b0e686eae11 + last_write_checksum: sha1:e88af75b949323e26552740bce0bdaa0264c53cb + pristine_git_object: a8bbf2756fb9b838470f6af607bac432ee22d3af src/main/java/com/apideck/unify/models/operations/AccountingProjectsUpdateRequestBuilder.java: id: 374b4ca8ac7a last_write_checksum: sha1:e39db5241e3d51d555a546de81fd6ceb45d17ce6 @@ -15661,8 +15901,8 @@ trackedFiles: pristine_git_object: c918ea5287015a16076e7df2205da268753fec10 src/main/java/com/apideck/unify/models/operations/AccountingRefundsUpdateRequest.java: id: 1c677cf7ddb9 - last_write_checksum: sha1:3c1d79e113277aa3253d55a8ef0aa05fb406a6fa - pristine_git_object: e4a849f7d2f0db7dbad34ff7aaea15dd15b69134 + last_write_checksum: sha1:8c5d6b56815e72dc276ab5fd0912b0164622ae28 + pristine_git_object: a0b6522b5c98628e35e1c1d0ef89c06a9acce2fb src/main/java/com/apideck/unify/models/operations/AccountingRefundsUpdateRequestBuilder.java: id: 4b0b35d4b4a2 last_write_checksum: sha1:bc0e3da7bea1e337a23c0eb97932ebc4804a30ec @@ -15781,8 +16021,8 @@ trackedFiles: pristine_git_object: d2a9013f0204be18b62f324b1cad4f4a2ff95fc9 src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java: id: 56a03128519f - last_write_checksum: sha1:a6cea5f79fd5d56f4203d6e0f32d36732f74f225 - pristine_git_object: 3c3101112ea04a3f47bb22f9b7ed2a2014ee60a6 + last_write_checksum: sha1:8ce4e97c82ac99664c833c9482a833f91b994b7e + pristine_git_object: 41d0e1f56c869ecadd952969164dae925df7b63b src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequestBuilder.java: id: ea194b8597b5 last_write_checksum: sha1:bed00460fce9a07baad2b05c46585f9321f4d89c @@ -21629,8 +21869,8 @@ trackedFiles: pristine_git_object: 60e3a4029b50493173c36771f59f35f34b9c345a src/main/java/com/apideck/unify/operations/AccountingBillPaymentsUpdate.java: id: 094fd3769674 - last_write_checksum: sha1:7cf580154591c075bc6868c1011ad9e8e1112616 - pristine_git_object: 03c9a675988ab5ed02858b142d6b36e059d0d51b + last_write_checksum: sha1:9a831ed297323463684d1bddbd6225862548eefa + pristine_git_object: 6d09c5ad4f2233e173a505851f6b462553a48b72 src/main/java/com/apideck/unify/operations/AccountingBillsAdd.java: id: eb38fd654fdb last_write_checksum: sha1:e6d5d192bdb6e6ce5bd3cefba02febb6cde2baaa @@ -21693,8 +21933,8 @@ trackedFiles: pristine_git_object: 500b83d623c7ffe119ef8b6a8fb873359606dcb0 src/main/java/com/apideck/unify/operations/AccountingCreditNotesUpdate.java: id: eab24b7bd3b0 - last_write_checksum: sha1:416dc2ef6b12b80b55f6ee7789b5f5fb501593ff - pristine_git_object: 60aba7502e458b55f145167809583d16ce1b71dc + last_write_checksum: sha1:56165b18f599d8deeda46eee28b7e80d3d96f825 + pristine_git_object: ec831e72da10e92995095a222f918b33061fb5c5 src/main/java/com/apideck/unify/operations/AccountingCustomersAdd.java: id: aa9f692446ee last_write_checksum: sha1:108b159b9a91b4c7abd86fe9aa438573e7cf5d43 @@ -21777,8 +22017,8 @@ trackedFiles: pristine_git_object: 7b99761b8d1cc1615da579814a27027c6dc5eb12 src/main/java/com/apideck/unify/operations/AccountingExpenseCategoriesUpdate.java: id: b5493be69ac8 - last_write_checksum: sha1:ab8dfdf9c1f4d8fde99b260f91e417b074c6d24a - pristine_git_object: 30b27ad29e18b0dc10d5b9ea185575c2a1c90ab4 + last_write_checksum: sha1:0dfde96663fabb5fe3c878e380daaf0d03cc9e06 + pristine_git_object: 603f5b2946e1e569292c0ca6872bc68b78db8781 src/main/java/com/apideck/unify/operations/AccountingExpenseReportsAdd.java: id: 4205db943dd3 last_write_checksum: sha1:4d0002b6071f999958a088bc2624b139a190a559 @@ -21797,8 +22037,8 @@ trackedFiles: pristine_git_object: aa0d31e3f7401166f0e71847e43a4041e7342166 src/main/java/com/apideck/unify/operations/AccountingExpenseReportsUpdate.java: id: 920909cc7393 - last_write_checksum: sha1:cb8e78c53b5cffaa268c6a38b6dc37d751798aad - pristine_git_object: aafca79ef661f81f29b965d10d1159ad95c3df34 + last_write_checksum: sha1:90e9bb1be02afb611568144212d563d4c334d696 + pristine_git_object: df6d998b650a1266aec1310d6dc307f2a8bb79ab src/main/java/com/apideck/unify/operations/AccountingExpensesAdd.java: id: 41a9de38d50f last_write_checksum: sha1:4c1045fbae9cc552d201f18f90e7d1b671a76686 @@ -21817,8 +22057,8 @@ trackedFiles: pristine_git_object: acc0351bd31e4a521778643a4e8fefe2a9401359 src/main/java/com/apideck/unify/operations/AccountingExpensesUpdate.java: id: 0865254fb33d - last_write_checksum: sha1:495c836444ef36f75bb4cddb8904cb91a42d742f - pristine_git_object: fe47b20518ee861f65a96cf86a76e8db4a1202f6 + last_write_checksum: sha1:0bff54fa9c1070fba20a2fcd1fbc62776f07a0ba + pristine_git_object: 97a2654e292b66426cd9eea9c803c317c46d7dd4 src/main/java/com/apideck/unify/operations/AccountingFiscalPeriodsAll.java: id: a85ae61642be last_write_checksum: sha1:6050a9a6fc0611b235d83b23a142009978d54aaa @@ -22017,8 +22257,8 @@ trackedFiles: pristine_git_object: 1bf9c73b8b84c1c1c0a432284f46e8751a7eed41 src/main/java/com/apideck/unify/operations/AccountingPaymentsUpdate.java: id: 93a7013eb756 - last_write_checksum: sha1:159a7584163f6816181bf9d12b678250a155ccab - pristine_git_object: 9f786d3f8a91aa149e7bd6f1b0a2456b751076e0 + last_write_checksum: sha1:c4c2967fc072727fa4767754d4ff490952eab0c7 + pristine_git_object: 140b96af34cfddda69418fa67735ba0b2e7e495c src/main/java/com/apideck/unify/operations/AccountingProfitAndLossOne.java: id: 567d8ced9ec4 last_write_checksum: sha1:a7917ffb594bd4b632b4847b9ae0f7b737553c90 @@ -22041,8 +22281,8 @@ trackedFiles: pristine_git_object: 61cc39c5afa4ec1aede155784c68f73c8f64d237 src/main/java/com/apideck/unify/operations/AccountingProjectsUpdate.java: id: 4bb8f4f21c9b - last_write_checksum: sha1:f1216af19840481463146475d7b9aa41f980322d - pristine_git_object: 4760e966e3939963fc37ad3d5aac88522ad14610 + last_write_checksum: sha1:31a5442fd4bce1608b7ccf38032153361824ad17 + pristine_git_object: 5c58cd251048dced9dab152e4063516fd9a20e9b src/main/java/com/apideck/unify/operations/AccountingPurchaseOrdersAdd.java: id: ef169820d005 last_write_checksum: sha1:33503797222caf75419f972c3cfedd6fdf5e28fc @@ -22101,8 +22341,8 @@ trackedFiles: pristine_git_object: be4040035a50b7db26adb7eb6f3092aa4d15e4dc src/main/java/com/apideck/unify/operations/AccountingRefundsUpdate.java: id: 07bf563b44b7 - last_write_checksum: sha1:b790dcee337f24b42b3e8e4425e53b11fa8c20d4 - pristine_git_object: 1b685d59cf42f3b2e0361c7265454a9c485f1bd2 + last_write_checksum: sha1:e44c3a6d8aa7841c85916b86f9ff2dae506e4db0 + pristine_git_object: 7a52c80152847be85c3a0985ad789c3dad8644a2 src/main/java/com/apideck/unify/operations/AccountingSalesOrdersAdd.java: id: c22f767a35ea last_write_checksum: sha1:3f33d28bb76ecd00f200eb02b0b828ef336db4be @@ -22141,8 +22381,8 @@ trackedFiles: pristine_git_object: b170e46728c10dcb9c0ffc5f71109fb0c253caea src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java: id: 7fbef6a6f381 - last_write_checksum: sha1:bd1a0a4d06a94000ac738f8c53d3e11c58ccd67e - pristine_git_object: 3edf9a5bb83947d195c30d33cff2ee89a784e826 + last_write_checksum: sha1:1b1bfbc0621cbf92c09ca76416e36ad07abf1d38 + pristine_git_object: ea5a1378aa574a3ce6643839ccdb1a2384867488 src/main/java/com/apideck/unify/operations/AccountingSubsidiariesAdd.java: id: 5cf8dd907b42 last_write_checksum: sha1:a1165be6e72d129485de315608d2052bd7c5974f @@ -40991,6 +41231,17 @@ examples: application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: | + ## Java SDK Changes: + * `apideck.accounting.creditNotes.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.payments.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.refunds.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.salesReceipts.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.billPayments.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.expenses.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.projects.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.expenseCategories.update()`: `request` **Changed** (Breaking ⚠️) + * `apideck.accounting.expenseReports.update()`: `request` **Changed** (Breaking ⚠️) generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ff538f951..06d778bf4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.52.0 + version: 0.53.0 additionalDependencies: [] additionalPlugins: [] artifactID: unify diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c36f96a64..86dccae3d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,19 +2,19 @@ speakeasyVersion: 1.806.0 sources: Apideck-OAS: sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:17ef009cb43f0eb43d2b730785c39b5a478872f1c5ce12bf8d981d68e62208bd - sourceBlobDigest: sha256:7bb12b0a44c83d5511abc3a68830e67888c1d78061f516c4616de74f4c355a73 + sourceRevisionDigest: sha256:ad1c141314c7ead620b7f511ce548a8604d3c298781162bb9e375448e32b7001 + sourceBlobDigest: sha256:77685734a4339cd933f32a6152913f7047a00468a8f90a25f9e0a365b691d7db tags: - latest - - 10.76.0 + - 10.77.0 targets: apideck: source: Apideck-OAS sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:17ef009cb43f0eb43d2b730785c39b5a478872f1c5ce12bf8d981d68e62208bd - sourceBlobDigest: sha256:7bb12b0a44c83d5511abc3a68830e67888c1d78061f516c4616de74f4c355a73 + sourceRevisionDigest: sha256:ad1c141314c7ead620b7f511ce548a8604d3c298781162bb9e375448e32b7001 + sourceBlobDigest: sha256:77685734a4339cd933f32a6152913f7047a00468a8f90a25f9e0a365b691d7db codeSamplesNamespace: apideck-oas-java-code-samples - codeSamplesRevisionDigest: sha256:3c70e92376dd33f32a41867592fc79cca77173a961349c2567f3a454e1cc4c1a + codeSamplesRevisionDigest: sha256:c529a72e5833f9e5ffb10570329c9400e68d198fedf8f2e18c33e51caa9cfbf3 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 31e549f6c..8771b867a 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.apideck:unify:0.52.0' +implementation 'com.apideck:unify:0.53.0' ``` Maven: @@ -59,7 +59,7 @@ Maven: com.apideck unify - 0.52.0 + 0.53.0 ``` diff --git a/RELEASES.md b/RELEASES.md index 69d4ae4c3..f52c04027 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1358,4 +1358,14 @@ Based on: ### Generated - [java v0.52.0] . ### Releases -- [Maven Central v0.52.0] https://central.sonatype.com/artifact/com.apideck/unify/0.52.0 - . \ No newline at end of file +- [Maven Central v0.52.0] https://central.sonatype.com/artifact/com.apideck/unify/0.52.0 - . + +## 2026-11-04 16:08:20 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.806.0 (2.956.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.53.0] . +### Releases +- [Maven Central v0.53.0] https://central.sonatype.com/artifact/com.apideck/unify/0.53.0 - . \ No newline at end of file diff --git a/docs/models/components/BillPaymentUpdateInput.md b/docs/models/components/BillPaymentUpdateInput.md new file mode 100644 index 000000000..e5de3e1d7 --- /dev/null +++ b/docs/models/components/BillPaymentUpdateInput.md @@ -0,0 +1,32 @@ +# BillPaymentUpdateInput + +The writable shape of BillPayment for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the transaction or record | 49.99 | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional transaction reference message ie: Debit remittance detail. | 123456 | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `supplier` | [JsonNullable\](../../models/components/LinkedSupplierInput.md) | :heavy_minus_sign: | The supplier this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `subsidiary` | [JsonNullable\](../../models/components/LinkedSubsidiaryInput.md) | :heavy_minus_sign: | N/A | | +| `reconciled` | *JsonNullable\* | :heavy_minus_sign: | Indicates if the transaction has been reconciled. | true | +| `status` | [Optional\](../../models/components/PaymentStatus.md) | :heavy_minus_sign: | Status of payment | authorised | +| `type` | [Optional\](../../models/components/BillPaymentUpdateInputBillPaymentType.md) | :heavy_minus_sign: | Type of payment | accounts_payable | +| `allocations` | List\<[BillPaymentUpdateInputAllocations](../../models/components/BillPaymentUpdateInputAllocations.md)> | :heavy_minus_sign: | N/A | | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Note associated with the transaction | Some notes about this transaction | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Number associated with the transaction | 123456 | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `displayId` | *JsonNullable\* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/BillPaymentUpdateInputAllocationType.md b/docs/models/components/BillPaymentUpdateInputAllocationType.md new file mode 100644 index 000000000..ff15b9cb0 --- /dev/null +++ b/docs/models/components/BillPaymentUpdateInputAllocationType.md @@ -0,0 +1,27 @@ +# BillPaymentUpdateInputAllocationType + +Type of entity this payment should be attributed to. + +## Example Usage + +```java +import com.apideck.unify.models.components.BillPaymentUpdateInputAllocationType; + +BillPaymentUpdateInputAllocationType value = BillPaymentUpdateInputAllocationType.BILL; + +// Open enum: use .of() to create instances from custom string values +BillPaymentUpdateInputAllocationType custom = BillPaymentUpdateInputAllocationType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `BILL` | bill | +| `EXPENSE` | expense | +| `CREDIT_MEMO` | credit_memo | +| `OVER_PAYMENT` | over_payment | +| `PRE_PAYMENT` | pre_payment | +| `JOURNAL_ENTRY` | journal_entry | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/BillPaymentUpdateInputAllocations.md b/docs/models/components/BillPaymentUpdateInputAllocations.md new file mode 100644 index 000000000..62a3216cb --- /dev/null +++ b/docs/models/components/BillPaymentUpdateInputAllocations.md @@ -0,0 +1,11 @@ +# BillPaymentUpdateInputAllocations + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `id` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `type` | [Optional\](../../models/components/BillPaymentUpdateInputAllocationType.md) | :heavy_minus_sign: | Type of entity this payment should be attributed to. | bill | +| `amount` | *JsonNullable\* | :heavy_minus_sign: | Amount of payment that should be attributed to this allocation. If null, the total_amount will be used. | 49.99 | +| `allocationId` | *Optional\* | :heavy_minus_sign: | Unique identifier of the allocation | 123456 | \ No newline at end of file diff --git a/docs/models/components/BillPaymentUpdateInputBillPaymentType.md b/docs/models/components/BillPaymentUpdateInputBillPaymentType.md new file mode 100644 index 000000000..e810f2eda --- /dev/null +++ b/docs/models/components/BillPaymentUpdateInputBillPaymentType.md @@ -0,0 +1,24 @@ +# BillPaymentUpdateInputBillPaymentType + +Type of payment + +## Example Usage + +```java +import com.apideck.unify.models.components.BillPaymentUpdateInputBillPaymentType; + +BillPaymentUpdateInputBillPaymentType value = BillPaymentUpdateInputBillPaymentType.ACCOUNTS_PAYABLE_CREDIT; + +// Open enum: use .of() to create instances from custom string values +BillPaymentUpdateInputBillPaymentType custom = BillPaymentUpdateInputBillPaymentType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------------------ | ------------------------------ | +| `ACCOUNTS_PAYABLE_CREDIT` | accounts_payable_credit | +| `ACCOUNTS_PAYABLE_OVERPAYMENT` | accounts_payable_overpayment | +| `ACCOUNTS_PAYABLE_PREPAYMENT` | accounts_payable_prepayment | +| `ACCOUNTS_PAYABLE` | accounts_payable | \ No newline at end of file diff --git a/docs/models/components/CreditNoteUpdateInput.md b/docs/models/components/CreditNoteUpdateInput.md new file mode 100644 index 000000000..2a533547e --- /dev/null +++ b/docs/models/components/CreditNoteUpdateInput.md @@ -0,0 +1,41 @@ +# CreditNoteUpdateInput + +The writable shape of CreditNote for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Credit note number. | OIT00546 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `subsidiary` | [JsonNullable\](../../models/components/LinkedSubsidiaryInput.md) | :heavy_minus_sign: | N/A | | +| `locationId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the location | 12345 | +| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Sub-total amount, normally before tax. | 27500 | +| `totalAmount` | *Optional\* | :heavy_minus_sign: | Amount of transaction | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this invoice. | 2500 | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `balance` | *JsonNullable\* | :heavy_minus_sign: | The balance reflecting any payments made against the transaction. | 27500 | +| `remainingCredit` | *JsonNullable\* | :heavy_minus_sign: | Indicates the total credit amount still available to apply towards the payment. | 27500 | +| `status` | [Optional\](../../models/components/CreditNoteUpdateInputCreditNoteStatus.md) | :heavy_minus_sign: | Status of credit notes | authorised | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message ie: Debit remittance detail. | 123456 | +| `dateIssued` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `datePaid` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `type` | [Optional\](../../models/components/CreditNoteUpdateInputCreditNoteType.md) | :heavy_minus_sign: | Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most connectors only expose the accounts-receivable side. Check the connector's gotchas for known deviations. | accounts_receivable_credit | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | N/A | | +| `allocations` | List\<[AllocationInput](../../models/components/AllocationInput.md)> | :heavy_minus_sign: | N/A | | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the credit note. | Some notes about this credit note | +| `terms` | *JsonNullable\* | :heavy_minus_sign: | Optional terms to be associated with the credit note. | Some terms about this credit note | +| `termsId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the payment terms | 12345 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/CreditNoteUpdateInputCreditNoteStatus.md b/docs/models/components/CreditNoteUpdateInputCreditNoteStatus.md new file mode 100644 index 000000000..1aaa7d21d --- /dev/null +++ b/docs/models/components/CreditNoteUpdateInputCreditNoteStatus.md @@ -0,0 +1,27 @@ +# CreditNoteUpdateInputCreditNoteStatus + +Status of credit notes + +## Example Usage + +```java +import com.apideck.unify.models.components.CreditNoteUpdateInputCreditNoteStatus; + +CreditNoteUpdateInputCreditNoteStatus value = CreditNoteUpdateInputCreditNoteStatus.DRAFT; + +// Open enum: use .of() to create instances from custom string values +CreditNoteUpdateInputCreditNoteStatus custom = CreditNoteUpdateInputCreditNoteStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DRAFT` | draft | +| `AUTHORISED` | authorised | +| `POSTED` | posted | +| `PARTIALLY_PAID` | partially_paid | +| `PAID` | paid | +| `VOIDED` | voided | +| `DELETED` | deleted | \ No newline at end of file diff --git a/docs/models/components/CreditNoteUpdateInputCreditNoteType.md b/docs/models/components/CreditNoteUpdateInputCreditNoteType.md new file mode 100644 index 000000000..b791c6a0d --- /dev/null +++ b/docs/models/components/CreditNoteUpdateInputCreditNoteType.md @@ -0,0 +1,22 @@ +# CreditNoteUpdateInputCreditNoteType + +Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most connectors only expose the accounts-receivable side. Check the connector's gotchas for known deviations. + +## Example Usage + +```java +import com.apideck.unify.models.components.CreditNoteUpdateInputCreditNoteType; + +CreditNoteUpdateInputCreditNoteType value = CreditNoteUpdateInputCreditNoteType.ACCOUNTS_RECEIVABLE_CREDIT; + +// Open enum: use .of() to create instances from custom string values +CreditNoteUpdateInputCreditNoteType custom = CreditNoteUpdateInputCreditNoteType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------------------------- | ---------------------------- | +| `ACCOUNTS_RECEIVABLE_CREDIT` | accounts_receivable_credit | +| `ACCOUNTS_PAYABLE_CREDIT` | accounts_payable_credit | \ No newline at end of file diff --git a/docs/models/components/ExpenseCategoryUpdateInput.md b/docs/models/components/ExpenseCategoryUpdateInput.md new file mode 100644 index 000000000..1f845423f --- /dev/null +++ b/docs/models/components/ExpenseCategoryUpdateInput.md @@ -0,0 +1,21 @@ +# ExpenseCategoryUpdateInput + +The writable shape of ExpenseCategory for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `displayId` | *JsonNullable\* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the expense category. | Travel | +| `code` | *JsonNullable\* | :heavy_minus_sign: | The code or external identifier of the expense category. | TRAVEL-001 | +| `description` | *JsonNullable\* | :heavy_minus_sign: | The description of the expense category. | Travel-related expenses including flights, hotels, and ground transportation. | +| `status` | [JsonNullable\](../../models/components/ExpenseCategoryUpdateInputStatus.md) | :heavy_minus_sign: | The status of the expense category. | active | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `offsetAccount` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | +| `rateRequired` | *JsonNullable\* | :heavy_minus_sign: | Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). | false | +| `defaultRate` | *JsonNullable\* | :heavy_minus_sign: | Default rate when rate_required is true (e.g. 0.67 for mileage). | 0.67 | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/ExpenseCategoryUpdateInputStatus.md b/docs/models/components/ExpenseCategoryUpdateInputStatus.md new file mode 100644 index 000000000..1cc83b185 --- /dev/null +++ b/docs/models/components/ExpenseCategoryUpdateInputStatus.md @@ -0,0 +1,22 @@ +# ExpenseCategoryUpdateInputStatus + +The status of the expense category. + +## Example Usage + +```java +import com.apideck.unify.models.components.ExpenseCategoryUpdateInputStatus; + +ExpenseCategoryUpdateInputStatus value = ExpenseCategoryUpdateInputStatus.ACTIVE; + +// Open enum: use .of() to create instances from custom string values +ExpenseCategoryUpdateInputStatus custom = ExpenseCategoryUpdateInputStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACTIVE` | active | +| `INACTIVE` | inactive | \ No newline at end of file diff --git a/docs/models/components/ExpenseReportUpdateInput.md b/docs/models/components/ExpenseReportUpdateInput.md new file mode 100644 index 000000000..44d48f698 --- /dev/null +++ b/docs/models/components/ExpenseReportUpdateInput.md @@ -0,0 +1,37 @@ +# ExpenseReportUpdateInput + +The writable shape of ExpenseReport for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `displayId` | *JsonNullable\* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `number` | *JsonNullable\* | :heavy_minus_sign: | The expense report number. | ER-001 | +| `title` | *JsonNullable\* | :heavy_minus_sign: | Title or purpose of the expense report. | Q1 Business Travel | +| `employee` | [Optional\](../../models/components/ExpenseReportUpdateInputEmployee.md) | :heavy_minus_sign: | The employee who submitted the expense report. | | +| `status` | [JsonNullable\](../../models/components/ExpenseReportUpdateInputStatus.md) | :heavy_minus_sign: | The status of the expense report. | submitted | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `postingDate` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The date the expense report was posted to the general ledger. | 2024-06-01 | +| `dueDate` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | Date when reimbursement is due. | 2024-06-15 | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | Total amount of all expense lines including tax. | 1250.75 | +| `reimbursableAmount` | *JsonNullable\* | :heavy_minus_sign: | Total reimbursable amount (may differ from total if some expenses are non-reimbursable). | 1100 | +| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense report. | Business travel expenses for Q1 client meetings | +| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `location` | [JsonNullable\](../../models/components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `accountingPeriod` | [JsonNullable\](../../models/components/ExpenseReportUpdateInputAccountingPeriod.md) | :heavy_minus_sign: | The accounting period the expense report is posted to. | | +| `lineItems` | List\<[ExpenseReportLineItemInput](../../models/components/ExpenseReportLineItemInput.md)> | :heavy_minus_sign: | Expense line items linked to this expense report. | | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | +| `subsidiary` | [JsonNullable\](../../models/components/LinkedSubsidiaryInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `approvedBy` | [JsonNullable\](../../models/components/ExpenseReportUpdateInputApprovedBy.md) | :heavy_minus_sign: | The person who approved the expense report. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/ExpenseReportUpdateInputAccountingPeriod.md b/docs/models/components/ExpenseReportUpdateInputAccountingPeriod.md new file mode 100644 index 000000000..f76c7f52a --- /dev/null +++ b/docs/models/components/ExpenseReportUpdateInputAccountingPeriod.md @@ -0,0 +1,11 @@ +# ExpenseReportUpdateInputAccountingPeriod + +The accounting period the expense report is posted to. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for the accounting period. | 12345 | +| `name` | *JsonNullable\* | :heavy_minus_sign: | The name of the accounting period. | Q1 2024 | \ No newline at end of file diff --git a/docs/models/components/ExpenseReportUpdateInputApprovedBy.md b/docs/models/components/ExpenseReportUpdateInputApprovedBy.md new file mode 100644 index 000000000..f624e239a --- /dev/null +++ b/docs/models/components/ExpenseReportUpdateInputApprovedBy.md @@ -0,0 +1,11 @@ +# ExpenseReportUpdateInputApprovedBy + +The person who approved the expense report. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for the approver. | 12345 | +| `displayName` | *JsonNullable\* | :heavy_minus_sign: | The display name of the approver. | Jane Smith | \ No newline at end of file diff --git a/docs/models/components/ExpenseReportUpdateInputEmployee.md b/docs/models/components/ExpenseReportUpdateInputEmployee.md new file mode 100644 index 000000000..08a1cc00c --- /dev/null +++ b/docs/models/components/ExpenseReportUpdateInputEmployee.md @@ -0,0 +1,11 @@ +# ExpenseReportUpdateInputEmployee + +The employee who submitted the expense report. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | A unique identifier for the employee. | 12345 | +| `displayName` | *JsonNullable\* | :heavy_minus_sign: | The display name of the employee. | John Doe | \ No newline at end of file diff --git a/docs/models/components/ExpenseReportUpdateInputStatus.md b/docs/models/components/ExpenseReportUpdateInputStatus.md new file mode 100644 index 000000000..62762bd21 --- /dev/null +++ b/docs/models/components/ExpenseReportUpdateInputStatus.md @@ -0,0 +1,27 @@ +# ExpenseReportUpdateInputStatus + +The status of the expense report. + +## Example Usage + +```java +import com.apideck.unify.models.components.ExpenseReportUpdateInputStatus; + +ExpenseReportUpdateInputStatus value = ExpenseReportUpdateInputStatus.DRAFT; + +// Open enum: use .of() to create instances from custom string values +ExpenseReportUpdateInputStatus custom = ExpenseReportUpdateInputStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DRAFT` | draft | +| `SUBMITTED` | submitted | +| `APPROVED` | approved | +| `REIMBURSED` | reimbursed | +| `REJECTED` | rejected | +| `REVERSED` | reversed | +| `VOIDED` | voided | \ No newline at end of file diff --git a/docs/models/components/ExpenseUpdateInput.md b/docs/models/components/ExpenseUpdateInput.md new file mode 100644 index 000000000..c82dd5183 --- /dev/null +++ b/docs/models/components/ExpenseUpdateInput.md @@ -0,0 +1,38 @@ +# ExpenseUpdateInput + +The writable shape of Expense for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `displayId` | *JsonNullable\* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Number. | OIT00546 | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| ~~`accountId`~~ | *Optional\* | :heavy_minus_sign: | :warning: **DEPRECATED**: Deprecated. Use account instead..

The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead. | 123456 | +| `account` | [JsonNullable\](../../models/components/LinkedFinancialAccountInput.md) | :heavy_minus_sign: | A flexible account reference that can represent a ledger account (GL account), a bank account, or an employee payable account, depending on the connector's requirements. | | +| ~~`supplierId`~~ | *Optional\* | :heavy_minus_sign: | :warning: **DEPRECATED**: Deprecated. Use supplier instead..

The ID of the supplier this entity is linked to. Deprecated, use supplier instead. | 12345 | +| `supplier` | [JsonNullable\](../../models/components/LinkedSupplierInput.md) | :heavy_minus_sign: | The supplier this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `location` | [JsonNullable\](../../models/components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | +| `departmentId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the department | 12345 | +| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `paymentType` | [JsonNullable\](../../models/components/ExpenseUpdateInputPaymentType.md) | :heavy_minus_sign: | The type of payment for the expense. | cash | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `type` | [JsonNullable\](../../models/components/ExpenseUpdateInputExpenseType.md) | :heavy_minus_sign: | The type of expense. | expense | +| `memo` | *JsonNullable\* | :heavy_minus_sign: | The memo of the expense. | For travel expenses incurred on 2024-05-15 | +| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the expense line item. | 275 | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `lineItems` | List\<[ExpenseLineItemInput](../../models/components/ExpenseLineItemInput.md)> | :heavy_minus_sign: | Expense line items linked to this expense. | | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference identifier for the transaction. | INV-2024-001 | +| `sourceDocumentUrl` | *JsonNullable\* | :heavy_minus_sign: | URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero. | https://www.invoicesolution.com/expense/123456 | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `status` | [JsonNullable\](../../models/components/ExpenseUpdateInputStatus.md) | :heavy_minus_sign: | Expense status | draft | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/ExpenseUpdateInputExpenseType.md b/docs/models/components/ExpenseUpdateInputExpenseType.md new file mode 100644 index 000000000..8080e0c55 --- /dev/null +++ b/docs/models/components/ExpenseUpdateInputExpenseType.md @@ -0,0 +1,22 @@ +# ExpenseUpdateInputExpenseType + +The type of expense. + +## Example Usage + +```java +import com.apideck.unify.models.components.ExpenseUpdateInputExpenseType; + +ExpenseUpdateInputExpenseType value = ExpenseUpdateInputExpenseType.EXPENSE; + +// Open enum: use .of() to create instances from custom string values +ExpenseUpdateInputExpenseType custom = ExpenseUpdateInputExpenseType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `EXPENSE` | expense | +| `REFUND` | refund | \ No newline at end of file diff --git a/docs/models/components/ExpenseUpdateInputPaymentType.md b/docs/models/components/ExpenseUpdateInputPaymentType.md new file mode 100644 index 000000000..14a6f0baf --- /dev/null +++ b/docs/models/components/ExpenseUpdateInputPaymentType.md @@ -0,0 +1,24 @@ +# ExpenseUpdateInputPaymentType + +The type of payment for the expense. + +## Example Usage + +```java +import com.apideck.unify.models.components.ExpenseUpdateInputPaymentType; + +ExpenseUpdateInputPaymentType value = ExpenseUpdateInputPaymentType.CASH; + +// Open enum: use .of() to create instances from custom string values +ExpenseUpdateInputPaymentType custom = ExpenseUpdateInputPaymentType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `CASH` | cash | +| `CHECK` | check | +| `CREDIT_CARD` | credit_card | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/ExpenseUpdateInputStatus.md b/docs/models/components/ExpenseUpdateInputStatus.md new file mode 100644 index 000000000..b3986534c --- /dev/null +++ b/docs/models/components/ExpenseUpdateInputStatus.md @@ -0,0 +1,23 @@ +# ExpenseUpdateInputStatus + +Expense status + +## Example Usage + +```java +import com.apideck.unify.models.components.ExpenseUpdateInputStatus; + +ExpenseUpdateInputStatus value = ExpenseUpdateInputStatus.DRAFT; + +// Open enum: use .of() to create instances from custom string values +ExpenseUpdateInputStatus custom = ExpenseUpdateInputStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `DRAFT` | draft | +| `POSTED` | posted | +| `VOIDED` | voided | \ No newline at end of file diff --git a/docs/models/components/PaymentUpdateInput.md b/docs/models/components/PaymentUpdateInput.md new file mode 100644 index 000000000..7a1626cfe --- /dev/null +++ b/docs/models/components/PaymentUpdateInput.md @@ -0,0 +1,35 @@ +# PaymentUpdateInput + +The writable shape of Payment for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the transaction or record | 49.99 | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional transaction reference message ie: Debit remittance detail. | 123456 | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| ~~`accountsReceivableAccountType`~~ | *JsonNullable\* | :heavy_minus_sign: | :warning: **DEPRECATED**: This field is deprecated and may be removed in a future version..

Type of accounts receivable account. | Account | +| ~~`accountsReceivableAccountId`~~ | *JsonNullable\* | :heavy_minus_sign: | :warning: **DEPRECATED**: This field is deprecated and may be removed in a future version..

Unique identifier for the account to allocate payment to. | 123456 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| ~~`supplier`~~ | [JsonNullable\](../../models/components/DeprecatedLinkedSupplierInput.md) | :heavy_minus_sign: | :warning: **DEPRECATED**: This field is deprecated and may be removed in a future version..

The supplier this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `subsidiary` | [JsonNullable\](../../models/components/LinkedSubsidiaryInput.md) | :heavy_minus_sign: | N/A | | +| `reconciled` | *JsonNullable\* | :heavy_minus_sign: | Indicates if the transaction has been reconciled. | true | +| `status` | [Optional\](../../models/components/PaymentStatus.md) | :heavy_minus_sign: | Status of payment | authorised | +| `type` | [Optional\](../../models/components/PaymentType.md) | :heavy_minus_sign: | Type of payment | accounts_receivable | +| `allocations` | List\<[AllocationInput](../../models/components/AllocationInput.md)> | :heavy_minus_sign: | N/A | | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Note associated with the transaction | Some notes about this transaction | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Number associated with the transaction | 123456 | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `displayId` | *JsonNullable\* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInput.md b/docs/models/components/ProjectUpdateInput.md new file mode 100644 index 000000000..f01f04da9 --- /dev/null +++ b/docs/models/components/ProjectUpdateInput.md @@ -0,0 +1,45 @@ +# ProjectUpdateInput + +The writable shape of Project for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *Optional\* | :heavy_minus_sign: | Name of the project | Website Redesign Project | +| `displayId` | *JsonNullable\* | :heavy_minus_sign: | User-friendly project identifier | PROJ-001 | +| `referenceId` | *JsonNullable\* | :heavy_minus_sign: | External reference identifier for the project | WD-REF-2024-001 | +| `description` | *JsonNullable\* | :heavy_minus_sign: | Detailed description of the project | Complete redesign of the company website including new branding and improved user experience | +| `status` | [JsonNullable\](../../models/components/ProjectUpdateInputProjectStatus.md) | :heavy_minus_sign: | Current status of the project | active | +| `active` | *JsonNullable\* | :heavy_minus_sign: | Indicates whether the project is currently active or inactive | true | +| `projectType` | [JsonNullable\](../../models/components/ProjectUpdateInputProjectType.md) | :heavy_minus_sign: | Type or category of the project | client_project | +| `priority` | [JsonNullable\](../../models/components/ProjectUpdateInputPriority.md) | :heavy_minus_sign: | Priority level of the project | high | +| `completionPercentage` | *JsonNullable\* | :heavy_minus_sign: | Percentage of project completion (0-100) | 75.5 | +| `startDate` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | Start date of the project | 2024-01-15 | +| `endDate` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | Expected or planned end date of the project | 2024-06-30 | +| `completionDate` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | Actual end date of the project | 2024-08-06 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `department` | [JsonNullable\](../../models/components/ProjectUpdateInputDepartment.md) | :heavy_minus_sign: | Department or organizational unit associated with the project | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `ownerId` | *JsonNullable\* | :heavy_minus_sign: | ID of the user who owns/manages this project | 12345 | +| `parentProject` | [JsonNullable\](../../models/components/ProjectUpdateInputParentProject.md) | :heavy_minus_sign: | Parent project if this is a subproject | | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `budgetAmount` | *JsonNullable\* | :heavy_minus_sign: | Total budgeted amount for the project | 50000 | +| `approvedAmount` | *JsonNullable\* | :heavy_minus_sign: | Approved budget amount for the project | 48000 | +| `budgetHours` | *JsonNullable\* | :heavy_minus_sign: | Total budgeted hours for the project | 400 | +| `hourlyRate` | *JsonNullable\* | :heavy_minus_sign: | Default hourly rate for project work | 125 | +| `billingMethod` | [JsonNullable\](../../models/components/ProjectUpdateInputBillingMethod.md) | :heavy_minus_sign: | Method used for billing this project | time_and_materials | +| `isBillable` | *JsonNullable\* | :heavy_minus_sign: | Indicates if the project is billable to the customer | true | +| `phase` | [JsonNullable\](../../models/components/ProjectUpdateInputProjectPhase.md) | :heavy_minus_sign: | Current phase of the project lifecycle | execution | +| `taxRate` | [Optional\](../../models/components/LinkedTaxRateInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `tags` | List\<*String*> | :heavy_minus_sign: | Tags associated with the project | [
"website",
"redesign",
"urgent"
] | +| `notes` | *JsonNullable\* | :heavy_minus_sign: | Additional notes about the project | Client has requested modern design with mobile-first approach | +| `contractNumber` | *JsonNullable\* | :heavy_minus_sign: | Contract or agreement number associated with the project | CNT-2024-001 | +| `profitMargin` | *JsonNullable\* | :heavy_minus_sign: | Expected profit margin percentage for the project | 15.5 | +| `scheduleStatus` | [JsonNullable\](../../models/components/ProjectUpdateInputScheduleStatus.md) | :heavy_minus_sign: | Current status of project schedule compared to plan | on_schedule | +| `addresses` | List\<[Address](../../models/components/Address.md)> | :heavy_minus_sign: | An array of addresses associated with the project (billing, job site, etc.) | | +| `teamSize` | *JsonNullable\* | :heavy_minus_sign: | Number of team members assigned to the project | 8 | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputBillingMethod.md b/docs/models/components/ProjectUpdateInputBillingMethod.md new file mode 100644 index 000000000..6d1d1242e --- /dev/null +++ b/docs/models/components/ProjectUpdateInputBillingMethod.md @@ -0,0 +1,25 @@ +# ProjectUpdateInputBillingMethod + +Method used for billing this project + +## Example Usage + +```java +import com.apideck.unify.models.components.ProjectUpdateInputBillingMethod; + +ProjectUpdateInputBillingMethod value = ProjectUpdateInputBillingMethod.FIXED_PRICE; + +// Open enum: use .of() to create instances from custom string values +ProjectUpdateInputBillingMethod custom = ProjectUpdateInputBillingMethod.of("custom_value"); +``` + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `FIXED_PRICE` | fixed_price | +| `TIME_AND_MATERIALS` | time_and_materials | +| `MILESTONE_BASED` | milestone_based | +| `RETAINER` | retainer | +| `NON_BILLABLE` | non_billable | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputDepartment.md b/docs/models/components/ProjectUpdateInputDepartment.md new file mode 100644 index 000000000..43b2b9d25 --- /dev/null +++ b/docs/models/components/ProjectUpdateInputDepartment.md @@ -0,0 +1,11 @@ +# ProjectUpdateInputDepartment + +Department or organizational unit associated with the project + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `id` | *Optional\* | :heavy_minus_sign: | Unique identifier for the department | DEPT-001 | +| `name` | *Optional\* | :heavy_minus_sign: | Name of the department | Marketing | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputParentProject.md b/docs/models/components/ProjectUpdateInputParentProject.md new file mode 100644 index 000000000..3edf66445 --- /dev/null +++ b/docs/models/components/ProjectUpdateInputParentProject.md @@ -0,0 +1,11 @@ +# ProjectUpdateInputParentProject + +Parent project if this is a subproject + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | Unique identifier for the parent project | PROJ-PARENT-001 | +| `name` | *Optional\* | :heavy_minus_sign: | Name of the parent project | Company Website Overhaul | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputPriority.md b/docs/models/components/ProjectUpdateInputPriority.md new file mode 100644 index 000000000..41aed69cd --- /dev/null +++ b/docs/models/components/ProjectUpdateInputPriority.md @@ -0,0 +1,24 @@ +# ProjectUpdateInputPriority + +Priority level of the project + +## Example Usage + +```java +import com.apideck.unify.models.components.ProjectUpdateInputPriority; + +ProjectUpdateInputPriority value = ProjectUpdateInputPriority.LOW; + +// Open enum: use .of() to create instances from custom string values +ProjectUpdateInputPriority custom = ProjectUpdateInputPriority.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `LOW` | low | +| `MEDIUM` | medium | +| `HIGH` | high | +| `CRITICAL` | critical | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputProjectPhase.md b/docs/models/components/ProjectUpdateInputProjectPhase.md new file mode 100644 index 000000000..6c4ec2b95 --- /dev/null +++ b/docs/models/components/ProjectUpdateInputProjectPhase.md @@ -0,0 +1,26 @@ +# ProjectUpdateInputProjectPhase + +Current phase of the project lifecycle + +## Example Usage + +```java +import com.apideck.unify.models.components.ProjectUpdateInputProjectPhase; + +ProjectUpdateInputProjectPhase value = ProjectUpdateInputProjectPhase.INITIATION; + +// Open enum: use .of() to create instances from custom string values +ProjectUpdateInputProjectPhase custom = ProjectUpdateInputProjectPhase.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `INITIATION` | initiation | +| `PLANNING` | planning | +| `EXECUTION` | execution | +| `MONITORING` | monitoring | +| `CLOSURE` | closure | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputProjectStatus.md b/docs/models/components/ProjectUpdateInputProjectStatus.md new file mode 100644 index 000000000..45901e58e --- /dev/null +++ b/docs/models/components/ProjectUpdateInputProjectStatus.md @@ -0,0 +1,28 @@ +# ProjectUpdateInputProjectStatus + +Current status of the project + +## Example Usage + +```java +import com.apideck.unify.models.components.ProjectUpdateInputProjectStatus; + +ProjectUpdateInputProjectStatus value = ProjectUpdateInputProjectStatus.ACTIVE; + +// Open enum: use .of() to create instances from custom string values +ProjectUpdateInputProjectStatus custom = ProjectUpdateInputProjectStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `ACTIVE` | active | +| `COMPLETED` | completed | +| `ON_HOLD` | on_hold | +| `CANCELLED` | cancelled | +| `DRAFT` | draft | +| `IN_PROGRESS` | in_progress | +| `APPROVED` | approved | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputProjectType.md b/docs/models/components/ProjectUpdateInputProjectType.md new file mode 100644 index 000000000..f33dff4db --- /dev/null +++ b/docs/models/components/ProjectUpdateInputProjectType.md @@ -0,0 +1,26 @@ +# ProjectUpdateInputProjectType + +Type or category of the project + +## Example Usage + +```java +import com.apideck.unify.models.components.ProjectUpdateInputProjectType; + +ProjectUpdateInputProjectType value = ProjectUpdateInputProjectType.CLIENT_PROJECT; + +// Open enum: use .of() to create instances from custom string values +ProjectUpdateInputProjectType custom = ProjectUpdateInputProjectType.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `CLIENT_PROJECT` | client_project | +| `INTERNAL_PROJECT` | internal_project | +| `MAINTENANCE` | maintenance | +| `RESEARCH_DEVELOPMENT` | research_development | +| `TRAINING` | training | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/components/ProjectUpdateInputScheduleStatus.md b/docs/models/components/ProjectUpdateInputScheduleStatus.md new file mode 100644 index 000000000..c9acd4a76 --- /dev/null +++ b/docs/models/components/ProjectUpdateInputScheduleStatus.md @@ -0,0 +1,24 @@ +# ProjectUpdateInputScheduleStatus + +Current status of project schedule compared to plan + +## Example Usage + +```java +import com.apideck.unify.models.components.ProjectUpdateInputScheduleStatus; + +ProjectUpdateInputScheduleStatus value = ProjectUpdateInputScheduleStatus.AHEAD_OF_SCHEDULE; + +// Open enum: use .of() to create instances from custom string values +ProjectUpdateInputScheduleStatus custom = ProjectUpdateInputScheduleStatus.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `AHEAD_OF_SCHEDULE` | ahead_of_schedule | +| `ON_SCHEDULE` | on_schedule | +| `BEHIND_SCHEDULE` | behind_schedule | +| `CRITICAL_DELAY` | critical_delay | \ No newline at end of file diff --git a/docs/models/components/RefundUpdateInput.md b/docs/models/components/RefundUpdateInput.md new file mode 100644 index 000000000..14446ef87 --- /dev/null +++ b/docs/models/components/RefundUpdateInput.md @@ -0,0 +1,41 @@ +# RefundUpdateInput + +The writable shape of Refund for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the refund. | RF-00001 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | The company ID the transaction belongs to | 12345 | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `refundDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `status` | [Optional\](../../models/components/RefundStatus.md) | :heavy_minus_sign: | Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state (draft/posted/voided), Zoho Books vis_state. | paid | +| `type` | [Optional\](../../models/components/RefundType.md) | :heavy_minus_sign: | Type of refund. `refund_receipt` for itemized refunds with product/service lines and payment (QBO RefundReceipt; also NetSuite's apply-list-based CustomerRefund). `cash_refund` for cash-out refunds with GL distribution or allocations (Sage Intacct). `credit_note_refund` for refunds applied against a credit note (Zoho Books). `sale_refund` for itemized refunds tied to a cash sale or return authorization, without an apply-list (NetSuite CashRefund) — NetSuite's apply-list-based CustomerRefund reports as `refund_receipt` instead. | refund_receipt | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | Line items for itemized refunds (type: refund_receipt or sale_refund). Used when the refund includes product/service details with quantities and pricing. Supported by QBO RefundReceipt and NetSuite CashRefund. | | +| `allocations` | List\<[AllocationInput](../../models/components/AllocationInput.md)> | :heavy_minus_sign: | Allocations linking refund to existing documents (invoices, credit notes, overpayments). Used for credit_note_refund and cash_refund types where the refund is applied against prior transactions. Supported by Sage Intacct and Zoho Books. | | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this refund. | 5.5 | +| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this refund. | 25 | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the refund. | Refund for returned items | +| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the refund. | REF-123456 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `location` | [JsonNullable\](../../models/components/LinkedLocationInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/components/SalesReceiptUpdateInput.md b/docs/models/components/SalesReceiptUpdateInput.md new file mode 100644 index 000000000..db670740b --- /dev/null +++ b/docs/models/components/SalesReceiptUpdateInput.md @@ -0,0 +1,36 @@ +# SalesReceiptUpdateInput + +The writable shape of SalesReceipt for a single-record update. Identical to the model with the read-only properties removed and no required properties, because PATCH is partial and the API already validates it that way. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *JsonNullable\* | :heavy_minus_sign: | Reference number for the sales receipt. | SR-00001 | +| `customer` | [JsonNullable\](../../models/components/LinkedCustomerInput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `currency` | [JsonNullable\](../../models/components/Currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currencyRate` | *JsonNullable\* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `taxInclusive` | *JsonNullable\* | :heavy_minus_sign: | Amounts are including tax | true | +| `subTotal` | *JsonNullable\* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `totalAmount` | *JsonNullable\* | :heavy_minus_sign: | The total amount of the transaction or record | 49.99 | +| `totalTax` | *JsonNullable\* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `transactionDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `paymentMethod` | *JsonNullable\* | :heavy_minus_sign: | Payment method used for the transaction, such as cash, credit card, bank transfer, or check | cash | +| `paymentMethodReference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message returned by payment method on processing | 123456 | +| `paymentMethodId` | *JsonNullable\* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `account` | [JsonNullable\](../../models/components/LinkedLedgerAccount.md) | :heavy_minus_sign: | N/A | | +| `lineItems` | List\<[InvoiceLineItemInput](../../models/components/InvoiceLineItemInput.md)> | :heavy_minus_sign: | Line items for itemized sales receipts. Used when the sales receipt includes product/service details with quantities and pricing. | | +| `taxCode` | *JsonNullable\* | :heavy_minus_sign: | Applicable tax id/code override if tax is not supplied on a line item basis. | 1234 | +| `discountPercentage` | *JsonNullable\* | :heavy_minus_sign: | Discount percentage applied to this sales receipt. | 5.5 | +| `discountAmount` | *JsonNullable\* | :heavy_minus_sign: | Discount amount applied to this sales receipt. | 25 | +| `note` | *JsonNullable\* | :heavy_minus_sign: | Optional note to be associated with the sales receipt. | Thank you for your purchase | +| `customerMemo` | *JsonNullable\* | :heavy_minus_sign: | Customer memo | Thank you for your business and have a great day! | +| `reference` | *JsonNullable\* | :heavy_minus_sign: | Optional reference message for the sales receipt. | REF-123456 | +| `billingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `shippingAddress` | [Optional\
](../../models/components/Address.md) | :heavy_minus_sign: | N/A | | +| `department` | [JsonNullable\](../../models/components/LinkedDepartmentInput.md) | :heavy_minus_sign: | N/A | | +| `trackingCategories` | List\<[LinkedTrackingCategory](../../models/components/LinkedTrackingCategory.md)> | :heavy_minus_sign: | A list of linked tracking categories. | | +| `customFields` | List\<[CustomField](../../models/components/CustomField.md)> | :heavy_minus_sign: | N/A | | +| `rowVersion` | *JsonNullable\* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `passThrough` | List\<[PassThroughBody](../../models/components/PassThroughBody.md)> | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/operations/AccountingBillPaymentsUpdateRequest.md b/docs/models/operations/AccountingBillPaymentsUpdateRequest.md index 66a5f2ee7..f0003d0f8 100644 --- a/docs/models/operations/AccountingBillPaymentsUpdateRequest.md +++ b/docs/models/operations/AccountingBillPaymentsUpdateRequest.md @@ -10,4 +10,4 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `billPayment` | [BillPaymentInput](../../models/components/BillPaymentInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `billPaymentUpdateInput` | [BillPaymentUpdateInput](../../models/components/BillPaymentUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingCreditNotesUpdateRequest.md b/docs/models/operations/AccountingCreditNotesUpdateRequest.md index 30222faa8..d5abb01df 100644 --- a/docs/models/operations/AccountingCreditNotesUpdateRequest.md +++ b/docs/models/operations/AccountingCreditNotesUpdateRequest.md @@ -10,4 +10,4 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `creditNote` | [CreditNoteInput](../../models/components/CreditNoteInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `creditNoteUpdateInput` | [CreditNoteUpdateInput](../../models/components/CreditNoteUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingExpenseCategoriesUpdateRequest.md b/docs/models/operations/AccountingExpenseCategoriesUpdateRequest.md index 6333d5a1a..7745a96f1 100644 --- a/docs/models/operations/AccountingExpenseCategoriesUpdateRequest.md +++ b/docs/models/operations/AccountingExpenseCategoriesUpdateRequest.md @@ -10,4 +10,4 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `expenseCategory` | [ExpenseCategoryInput](../../models/components/ExpenseCategoryInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `expenseCategoryUpdateInput` | [ExpenseCategoryUpdateInput](../../models/components/ExpenseCategoryUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingExpenseReportsUpdateRequest.md b/docs/models/operations/AccountingExpenseReportsUpdateRequest.md index 270a60957..8f3374d58 100644 --- a/docs/models/operations/AccountingExpenseReportsUpdateRequest.md +++ b/docs/models/operations/AccountingExpenseReportsUpdateRequest.md @@ -10,4 +10,4 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `expenseReport` | [ExpenseReportInput](../../models/components/ExpenseReportInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `expenseReportUpdateInput` | [ExpenseReportUpdateInput](../../models/components/ExpenseReportUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingExpensesUpdateRequest.md b/docs/models/operations/AccountingExpensesUpdateRequest.md index 580c3d0c4..f50089f81 100644 --- a/docs/models/operations/AccountingExpensesUpdateRequest.md +++ b/docs/models/operations/AccountingExpensesUpdateRequest.md @@ -10,4 +10,4 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `expense` | [ExpenseInput](../../models/components/ExpenseInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `expenseUpdateInput` | [ExpenseUpdateInput](../../models/components/ExpenseUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingPaymentsUpdateRequest.md b/docs/models/operations/AccountingPaymentsUpdateRequest.md index dd15b8da2..1352125bc 100644 --- a/docs/models/operations/AccountingPaymentsUpdateRequest.md +++ b/docs/models/operations/AccountingPaymentsUpdateRequest.md @@ -11,4 +11,4 @@ | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `payment` | [PaymentInput](../../models/components/PaymentInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `paymentUpdateInput` | [PaymentUpdateInput](../../models/components/PaymentUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingProjectsUpdateRequest.md b/docs/models/operations/AccountingProjectsUpdateRequest.md index dbcab5813..ab6442ee4 100644 --- a/docs/models/operations/AccountingProjectsUpdateRequest.md +++ b/docs/models/operations/AccountingProjectsUpdateRequest.md @@ -11,4 +11,4 @@ | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `project` | [ProjectInput](../../models/components/ProjectInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `projectUpdateInput` | [ProjectUpdateInput](../../models/components/ProjectUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingRefundsUpdateRequest.md b/docs/models/operations/AccountingRefundsUpdateRequest.md index 45e5744eb..160cb1fe3 100644 --- a/docs/models/operations/AccountingRefundsUpdateRequest.md +++ b/docs/models/operations/AccountingRefundsUpdateRequest.md @@ -10,4 +10,4 @@ | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `refund` | [RefundInput](../../models/components/RefundInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `refundUpdateInput` | [RefundUpdateInput](../../models/components/RefundUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md b/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md index d665b34ed..7c54bb2a0 100644 --- a/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md +++ b/docs/models/operations/AccountingSalesReceiptsUpdateRequest.md @@ -11,4 +11,4 @@ | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | | `companyId` | *Optional\* | :heavy_minus_sign: | The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings. | 12345 | -| `salesReceipt` | [SalesReceiptInput](../../models/components/SalesReceiptInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| `salesReceiptUpdateInput` | [SalesReceiptUpdateInput](../../models/components/SalesReceiptUpdateInput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdks/billpayments/README.md b/docs/sdks/billpayments/README.md index d5ff232be..1593d9cd7 100644 --- a/docs/sdks/billpayments/README.md +++ b/docs/sdks/billpayments/README.md @@ -372,11 +372,10 @@ public class Application { AccountingBillPaymentsUpdateRequest req = AccountingBillPaymentsUpdateRequest.builder() .id("") - .billPayment(BillPaymentInput.builder() - .totalAmount(49.99) - .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) + .billPaymentUpdateInput(BillPaymentUpdateInput.builder() .currency(Currency.USD) .currencyRate(0.69) + .totalAmount(49.99) .reference("123456") .paymentMethod("cash") .paymentMethodReference("123456") @@ -386,6 +385,7 @@ public class Application { .nominalCode("N091") .code("453") .build()) + .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .supplier(LinkedSupplierInput.builder() .id("12345") .displayName("Windsurf Shop") @@ -419,23 +419,23 @@ public class Application { .companyId("12345") .reconciled(true) .status(PaymentStatus.AUTHORISED) - .type(BillPaymentType.ACCOUNTS_PAYABLE) + .type(BillPaymentUpdateInputBillPaymentType.ACCOUNTS_PAYABLE) .allocations(List.of( - BillPaymentAllocations.builder() + BillPaymentUpdateInputAllocations.builder() .id("12345") - .type(BillPaymentAllocationType.BILL) + .type(BillPaymentUpdateInputAllocationType.BILL) .amount(49.99) .allocationId("123456") .build(), - BillPaymentAllocations.builder() + BillPaymentUpdateInputAllocations.builder() .id("12345") - .type(BillPaymentAllocationType.BILL) + .type(BillPaymentUpdateInputAllocationType.BILL) .amount(49.99) .allocationId("123456") .build(), - BillPaymentAllocations.builder() + BillPaymentUpdateInputAllocations.builder() .id("12345") - .type(BillPaymentAllocationType.BILL) + .type(BillPaymentUpdateInputAllocationType.BILL) .amount(49.99) .allocationId("123456") .build())) diff --git a/docs/sdks/creditnotes/README.md b/docs/sdks/creditnotes/README.md index 0102fea85..60d1d7e44 100644 --- a/docs/sdks/creditnotes/README.md +++ b/docs/sdks/creditnotes/README.md @@ -425,8 +425,7 @@ public class Application { AccountingCreditNotesUpdateRequest req = AccountingCreditNotesUpdateRequest.builder() .id("") - .creditNote(CreditNoteInput.builder() - .totalAmount(49.99) + .creditNoteUpdateInput(CreditNoteUpdateInput.builder() .number("OIT00546") .customer(LinkedCustomerInput.builder() .id("12345") @@ -438,15 +437,16 @@ public class Application { .currencyRate(0.69) .taxInclusive(true) .subTotal(27500d) + .totalAmount(49.99) .totalTax(2500d) .taxCode("1234") .balance(27500d) .remainingCredit(27500d) - .status(CreditNoteStatus.AUTHORISED) + .status(CreditNoteUpdateInputCreditNoteStatus.AUTHORISED) .reference("123456") .dateIssued(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .datePaid(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) - .type(CreditNoteType.ACCOUNTS_RECEIVABLE_CREDIT) + .type(CreditNoteUpdateInputCreditNoteType.ACCOUNTS_RECEIVABLE_CREDIT) .account(LinkedLedgerAccount.builder() .id("123456") .nominalCode("N091") diff --git a/docs/sdks/expensecategories/README.md b/docs/sdks/expensecategories/README.md index 53e0acf70..ab62354e2 100644 --- a/docs/sdks/expensecategories/README.md +++ b/docs/sdks/expensecategories/README.md @@ -285,12 +285,12 @@ public class Application { AccountingExpenseCategoriesUpdateRequest req = AccountingExpenseCategoriesUpdateRequest.builder() .id("") - .expenseCategory(ExpenseCategoryInput.builder() - .name("Travel") + .expenseCategoryUpdateInput(ExpenseCategoryUpdateInput.builder() .displayId("123456") + .name("Travel") .code("TRAVEL-001") .description("Travel-related expenses including flights, hotels, and ground transportation.") - .status(ExpenseCategoryStatus.ACTIVE) + .status(ExpenseCategoryUpdateInputStatus.ACTIVE) .account(LinkedLedgerAccount.builder() .id("123456") .name("Bank account") diff --git a/docs/sdks/expensereports/README.md b/docs/sdks/expensereports/README.md index c809f8777..5b7731fa0 100644 --- a/docs/sdks/expensereports/README.md +++ b/docs/sdks/expensereports/README.md @@ -321,17 +321,16 @@ public class Application { AccountingExpenseReportsUpdateRequest req = AccountingExpenseReportsUpdateRequest.builder() .id("") - .expenseReport(ExpenseReportInput.builder() - .employee(ExpenseReportEmployee.builder() + .expenseReportUpdateInput(ExpenseReportUpdateInput.builder() + .displayId("123456") + .number("ER-001") + .title("Q1 Business Travel") + .employee(ExpenseReportUpdateInputEmployee.builder() .id("12345") .displayName("John Doe") .build()) + .status(ExpenseReportUpdateInputStatus.SUBMITTED) .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) - .lineItems(List.of()) - .displayId("123456") - .number("ER-001") - .title("Q1 Business Travel") - .status(ExpenseReportStatus.SUBMITTED) .postingDate(LocalDate.parse("2024-06-01")) .dueDate(LocalDate.parse("2024-06-15")) .currency(Currency.USD) @@ -358,10 +357,11 @@ public class Application { .parentId("123456") .displayId("123456") .build()) - .accountingPeriod(AccountingPeriod.builder() + .accountingPeriod(ExpenseReportUpdateInputAccountingPeriod.builder() .id("12345") .name("Q1 2024") .build()) + .lineItems(List.of()) .reference("INV-2024-001") .subsidiary(LinkedSubsidiaryInput.builder() .displayId("123456") @@ -369,7 +369,7 @@ public class Application { .build()) .trackingCategories(JsonNullable.of(null)) .taxInclusive(true) - .approvedBy(ApprovedBy.builder() + .approvedBy(ExpenseReportUpdateInputApprovedBy.builder() .id("12345") .displayName("Jane Smith") .build()) diff --git a/docs/sdks/expenses/README.md b/docs/sdks/expenses/README.md index d8d6d6242..828feebe4 100644 --- a/docs/sdks/expenses/README.md +++ b/docs/sdks/expenses/README.md @@ -356,8 +356,23 @@ public class Application { AccountingExpensesUpdateRequest req = AccountingExpensesUpdateRequest.builder() .id("") - .expense(ExpenseInput.builder() + .expenseUpdateInput(ExpenseUpdateInput.builder() + .number("OIT00546") .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) + .accountId("123456") + .supplierId("12345") + .companyId("12345") + .departmentId("12345") + .paymentType(ExpenseUpdateInputPaymentType.CASH) + .currency(Currency.USD) + .currencyRate(0.69) + .type(ExpenseUpdateInputExpenseType.EXPENSE) + .memo("For travel expenses incurred on 2024-05-15") + .taxRate(LinkedTaxRateInput.builder() + .id("123456") + .rate(10d) + .build()) + .totalAmount(275d) .lineItems(List.of( ExpenseLineItemInput.builder() .totalAmount(275d) @@ -385,21 +400,6 @@ public class Application { .description("Travel US.") .lineNumber(1L) .build())) - .number("OIT00546") - .accountId("123456") - .supplierId("12345") - .companyId("12345") - .departmentId("12345") - .paymentType(ExpensePaymentType.CASH) - .currency(Currency.USD) - .currencyRate(0.69) - .type(ExpenseType.EXPENSE) - .memo("For travel expenses incurred on 2024-05-15") - .taxRate(LinkedTaxRateInput.builder() - .id("123456") - .rate(10d) - .build()) - .totalAmount(275d) .customFields(List.of( CustomField.of(CustomField1.builder() .id("2389328923893298") diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index e4cbe3194..b5a7b2eb3 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -329,11 +329,10 @@ public class Application { AccountingPaymentsUpdateRequest req = AccountingPaymentsUpdateRequest.builder() .id("") - .payment(PaymentInput.builder() - .totalAmount(49.99) - .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) + .paymentUpdateInput(PaymentUpdateInput.builder() .currency(Currency.USD) .currencyRate(0.69) + .totalAmount(49.99) .reference("123456") .paymentMethod("cash") .paymentMethodReference("123456") @@ -343,6 +342,7 @@ public class Application { .nominalCode("N091") .code("453") .build()) + .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .customer(LinkedCustomerInput.builder() .id("12345") .displayName("Windsurf Shop") diff --git a/docs/sdks/projects/README.md b/docs/sdks/projects/README.md index 109cc0024..b05050544 100644 --- a/docs/sdks/projects/README.md +++ b/docs/sdks/projects/README.md @@ -343,27 +343,27 @@ public class Application { AccountingProjectsUpdateRequest req = AccountingProjectsUpdateRequest.builder() .id("") - .project(ProjectInput.builder() + .projectUpdateInput(ProjectUpdateInput.builder() .name("Website Redesign Project") .displayId("PROJ-001") .referenceId("WD-REF-2024-001") .description("Complete redesign of the company website including new branding and improved user experience") - .status(ProjectProjectStatus.ACTIVE) + .status(ProjectUpdateInputProjectStatus.ACTIVE) .active(true) - .projectType(ProjectType.CLIENT_PROJECT) - .priority(Priority.HIGH) + .projectType(ProjectUpdateInputProjectType.CLIENT_PROJECT) + .priority(ProjectUpdateInputPriority.HIGH) .completionPercentage(75.5) .startDate(LocalDate.parse("2024-01-15")) .endDate(LocalDate.parse("2024-06-30")) .completionDate(LocalDate.parse("2024-08-06")) .customer(JsonNullable.of(null)) - .department(ProjectDepartment.builder() + .department(ProjectUpdateInputDepartment.builder() .id("DEPT-001") .name("Marketing") .build()) .companyId("12345") .ownerId("12345") - .parentProject(ParentProject.builder() + .parentProject(ProjectUpdateInputParentProject.builder() .id("PROJ-PARENT-001") .name("Company Website Overhaul") .build()) @@ -372,8 +372,8 @@ public class Application { .approvedAmount(48000d) .budgetHours(400d) .hourlyRate(125d) - .billingMethod(BillingMethod.TIME_AND_MATERIALS) - .phase(ProjectPhase.EXECUTION) + .billingMethod(ProjectUpdateInputBillingMethod.TIME_AND_MATERIALS) + .phase(ProjectUpdateInputProjectPhase.EXECUTION) .taxRate(LinkedTaxRateInput.builder() .id("123456") .code("N-T") @@ -393,7 +393,7 @@ public class Application { .notes("Client has requested modern design with mobile-first approach") .contractNumber("CNT-2024-001") .profitMargin(15.5) - .scheduleStatus(ScheduleStatus.ON_SCHEDULE) + .scheduleStatus(ProjectUpdateInputScheduleStatus.ON_SCHEDULE) .addresses(List.of( Address.builder() .id("123") diff --git a/docs/sdks/refunds/README.md b/docs/sdks/refunds/README.md index 48afac54a..04818d3c4 100644 --- a/docs/sdks/refunds/README.md +++ b/docs/sdks/refunds/README.md @@ -444,8 +444,7 @@ public class Application { AccountingRefundsUpdateRequest req = AccountingRefundsUpdateRequest.builder() .id("") - .refund(RefundInput.builder() - .totalAmount(49.99) + .refundUpdateInput(RefundUpdateInput.builder() .number("RF-00001") .customer(LinkedCustomerInput.builder() .id("12345") @@ -457,6 +456,7 @@ public class Application { .currencyRate(0.69) .taxInclusive(true) .subTotal(250d) + .totalAmount(49.99) .totalTax(25d) .refundDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .status(RefundStatus.PAID) diff --git a/docs/sdks/salesreceipts/README.md b/docs/sdks/salesreceipts/README.md index ea184c2f3..9fac2ab0a 100644 --- a/docs/sdks/salesreceipts/README.md +++ b/docs/sdks/salesreceipts/README.md @@ -438,8 +438,7 @@ public class Application { AccountingSalesReceiptsUpdateRequest req = AccountingSalesReceiptsUpdateRequest.builder() .id("") - .salesReceipt(SalesReceiptInput.builder() - .totalAmount(49.99) + .salesReceiptUpdateInput(SalesReceiptUpdateInput.builder() .number("SR-00001") .customer(LinkedCustomerInput.builder() .id("12345") @@ -450,6 +449,7 @@ public class Application { .currencyRate(0.69) .taxInclusive(true) .subTotal(250d) + .totalAmount(49.99) .totalTax(25d) .transactionDate(OffsetDateTime.parse("2021-05-01T12:00:00.000Z")) .paymentMethod("cash") diff --git a/gradle.properties b/gradle.properties index fa0d12c68..ebe783177 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.apideck artifactId=unify -version=0.52.0 +version=0.53.0 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/apideck/unify/SDKConfiguration.java b/src/main/java/com/apideck/unify/SDKConfiguration.java index 44509c0eb..7196123ad 100644 --- a/src/main/java/com/apideck/unify/SDKConfiguration.java +++ b/src/main/java/com/apideck/unify/SDKConfiguration.java @@ -20,8 +20,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; - public static final String OPENAPI_DOC_VERSION = "10.76.0"; - public static final String SDK_VERSION = "0.52.0"; + public static final String OPENAPI_DOC_VERSION = "10.77.0"; + public static final String SDK_VERSION = "0.53.0"; public static final String GEN_VERSION = "2.956.1"; private static final String BASE_PACKAGE = "com.apideck.unify"; public static final String USER_AGENT = diff --git a/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInput.java b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInput.java new file mode 100644 index 000000000..c5ade824b --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInput.java @@ -0,0 +1,1423 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * BillPaymentUpdateInput + * + *

The writable shape of BillPayment for a single-record update. Identical to the model with the + * read-only properties removed and no required properties, because PATCH is partial and the API + * already validates it that way. + */ +public class BillPaymentUpdateInput { + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * The total amount of the transaction or record + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method") + private JsonNullable paymentMethod; + + /** + * Optional reference message returned by payment method on processing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_reference") + private JsonNullable paymentMethodReference; + + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_id") + private JsonNullable paymentMethodId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * The supplier this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier") + private JsonNullable supplier; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subsidiary") + private JsonNullable subsidiary; + + /** + * Indicates if the transaction has been reconciled. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reconciled") + private JsonNullable reconciled; + + /** + * Status of payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * Type of payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allocations") + private Optional> allocations; + + /** + * Note associated with the transaction + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Number associated with the transaction + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * Id to be displayed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_id") + private JsonNullable displayId; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public BillPaymentUpdateInput( + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("payment_method") JsonNullable paymentMethod, + @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, + @JsonProperty("payment_method_id") JsonNullable paymentMethodId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("supplier") JsonNullable supplier, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("subsidiary") JsonNullable subsidiary, + @JsonProperty("reconciled") JsonNullable reconciled, + @JsonProperty("status") Optional status, + @JsonProperty("type") Optional type, + @JsonProperty("allocations") Optional> allocations, + @JsonProperty("note") JsonNullable note, + @JsonProperty("number") JsonNullable number, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("display_id") JsonNullable displayId, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(supplier, "supplier"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(subsidiary, "subsidiary"); + Utils.checkNotNull(reconciled, "reconciled"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(allocations, "allocations"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(displayId, "displayId"); + Utils.checkNotNull(passThrough, "passThrough"); + this.currency = currency; + this.currencyRate = currencyRate; + this.totalAmount = totalAmount; + this.reference = reference; + this.paymentMethod = paymentMethod; + this.paymentMethodReference = paymentMethodReference; + this.paymentMethodId = paymentMethodId; + this.account = account; + this.transactionDate = transactionDate; + this.supplier = supplier; + this.companyId = companyId; + this.subsidiary = subsidiary; + this.reconciled = reconciled; + this.status = status; + this.type = type; + this.allocations = allocations; + this.note = note; + this.number = number; + this.trackingCategories = trackingCategories; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.displayId = displayId; + this.passThrough = passThrough; + } + + public BillPaymentUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * The total amount of the transaction or record + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonIgnore + public JsonNullable paymentMethod() { + return paymentMethod; + } + + /** + * Optional reference message returned by payment method on processing + */ + @JsonIgnore + public JsonNullable paymentMethodReference() { + return paymentMethodReference; + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable paymentMethodId() { + return paymentMethodId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * The supplier this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable supplier() { + return (JsonNullable) supplier; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable subsidiary() { + return (JsonNullable) subsidiary; + } + + /** + * Indicates if the transaction has been reconciled. + */ + @JsonIgnore + public JsonNullable reconciled() { + return reconciled; + } + + /** + * Status of payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * Type of payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> allocations() { + return (Optional>) allocations; + } + + /** + * Note associated with the transaction + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Number associated with the transaction + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * Id to be displayed. + */ + @JsonIgnore + public JsonNullable displayId() { + return displayId; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public BillPaymentUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public BillPaymentUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public BillPaymentUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public BillPaymentUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * The total amount of the transaction or record + */ + public BillPaymentUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public BillPaymentUpdateInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public BillPaymentUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public BillPaymentUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public BillPaymentUpdateInput withPaymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public BillPaymentUpdateInput withPaymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public BillPaymentUpdateInput withPaymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public BillPaymentUpdateInput withPaymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + /** + * A unique identifier for an object. + */ + public BillPaymentUpdateInput withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public BillPaymentUpdateInput withPaymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public BillPaymentUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public BillPaymentUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public BillPaymentUpdateInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public BillPaymentUpdateInput withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * The supplier this entity is linked to. + */ + public BillPaymentUpdateInput withSupplier(LinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public BillPaymentUpdateInput withSupplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public BillPaymentUpdateInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public BillPaymentUpdateInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public BillPaymentUpdateInput withSubsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public BillPaymentUpdateInput withSubsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + /** + * Indicates if the transaction has been reconciled. + */ + public BillPaymentUpdateInput withReconciled(boolean reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = JsonNullable.of(reconciled); + return this; + } + + /** + * Indicates if the transaction has been reconciled. + */ + public BillPaymentUpdateInput withReconciled(JsonNullable reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = reconciled; + return this; + } + + /** + * Status of payment + */ + public BillPaymentUpdateInput withStatus(PaymentStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * Status of payment + */ + public BillPaymentUpdateInput withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Type of payment + */ + public BillPaymentUpdateInput withType(BillPaymentUpdateInputBillPaymentType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Type of payment + */ + public BillPaymentUpdateInput withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public BillPaymentUpdateInput withAllocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + + public BillPaymentUpdateInput withAllocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + /** + * Note associated with the transaction + */ + public BillPaymentUpdateInput withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Note associated with the transaction + */ + public BillPaymentUpdateInput withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Number associated with the transaction + */ + public BillPaymentUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number associated with the transaction + */ + public BillPaymentUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * A list of linked tracking categories. + */ + public BillPaymentUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public BillPaymentUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + public BillPaymentUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public BillPaymentUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public BillPaymentUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public BillPaymentUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * Id to be displayed. + */ + public BillPaymentUpdateInput withDisplayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public BillPaymentUpdateInput withDisplayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public BillPaymentUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public BillPaymentUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillPaymentUpdateInput other = (BillPaymentUpdateInput) o; + return + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod) && + Utils.enhancedDeepEquals(this.paymentMethodReference, other.paymentMethodReference) && + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.supplier, other.supplier) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.subsidiary, other.subsidiary) && + Utils.enhancedDeepEquals(this.reconciled, other.reconciled) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.allocations, other.allocations) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.displayId, other.displayId) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + currency, currencyRate, totalAmount, + reference, paymentMethod, paymentMethodReference, + paymentMethodId, account, transactionDate, + supplier, companyId, subsidiary, + reconciled, status, type, + allocations, note, number, + trackingCategories, customFields, rowVersion, + displayId, passThrough); + } + + @Override + public String toString() { + return Utils.toString(BillPaymentUpdateInput.class, + "currency", currency, + "currencyRate", currencyRate, + "totalAmount", totalAmount, + "reference", reference, + "paymentMethod", paymentMethod, + "paymentMethodReference", paymentMethodReference, + "paymentMethodId", paymentMethodId, + "account", account, + "transactionDate", transactionDate, + "supplier", supplier, + "companyId", companyId, + "subsidiary", subsidiary, + "reconciled", reconciled, + "status", status, + "type", type, + "allocations", allocations, + "note", note, + "number", number, + "trackingCategories", trackingCategories, + "customFields", customFields, + "rowVersion", rowVersion, + "displayId", displayId, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private JsonNullable reference = JsonNullable.undefined(); + + private JsonNullable paymentMethod = JsonNullable.undefined(); + + private JsonNullable paymentMethodReference = JsonNullable.undefined(); + + private JsonNullable paymentMethodId = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + private JsonNullable supplier = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable subsidiary = JsonNullable.undefined(); + + private JsonNullable reconciled = JsonNullable.undefined(); + + private Optional status = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional> allocations = Optional.empty(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private JsonNullable displayId = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(LinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + public Builder subsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public Builder subsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + + /** + * Indicates if the transaction has been reconciled. + */ + public Builder reconciled(boolean reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = JsonNullable.of(reconciled); + return this; + } + + /** + * Indicates if the transaction has been reconciled. + */ + public Builder reconciled(JsonNullable reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = reconciled; + return this; + } + + + /** + * Status of payment + */ + public Builder status(PaymentStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Status of payment + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Type of payment + */ + public Builder type(BillPaymentUpdateInputBillPaymentType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Type of payment + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder allocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + public Builder allocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + + /** + * Note associated with the transaction + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Note associated with the transaction + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Number associated with the transaction + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number associated with the transaction + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * Id to be displayed. + */ + public Builder displayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public Builder displayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public BillPaymentUpdateInput build() { + + return new BillPaymentUpdateInput( + currency, currencyRate, totalAmount, + reference, paymentMethod, paymentMethodReference, + paymentMethodId, account, transactionDate, + supplier, companyId, subsidiary, + reconciled, status, type, + allocations, note, number, + trackingCategories, customFields, rowVersion, + displayId, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocationType.java b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocationType.java new file mode 100644 index 000000000..9966e68e0 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocationType.java @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * BillPaymentUpdateInputAllocationType + * + *

Type of entity this payment should be attributed to. + */ +public class BillPaymentUpdateInputAllocationType { + + public static final BillPaymentUpdateInputAllocationType BILL = new BillPaymentUpdateInputAllocationType("bill"); + public static final BillPaymentUpdateInputAllocationType EXPENSE = new BillPaymentUpdateInputAllocationType("expense"); + public static final BillPaymentUpdateInputAllocationType CREDIT_MEMO = new BillPaymentUpdateInputAllocationType("credit_memo"); + public static final BillPaymentUpdateInputAllocationType OVER_PAYMENT = new BillPaymentUpdateInputAllocationType("over_payment"); + public static final BillPaymentUpdateInputAllocationType PRE_PAYMENT = new BillPaymentUpdateInputAllocationType("pre_payment"); + public static final BillPaymentUpdateInputAllocationType JOURNAL_ENTRY = new BillPaymentUpdateInputAllocationType("journal_entry"); + public static final BillPaymentUpdateInputAllocationType OTHER = new BillPaymentUpdateInputAllocationType("other"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private BillPaymentUpdateInputAllocationType(String value) { + this.value = value; + } + + /** + * Returns a BillPaymentUpdateInputAllocationType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as BillPaymentUpdateInputAllocationType + */ + @JsonCreator + public static BillPaymentUpdateInputAllocationType of(String value) { + synchronized (BillPaymentUpdateInputAllocationType.class) { + return values.computeIfAbsent(value, v -> new BillPaymentUpdateInputAllocationType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BillPaymentUpdateInputAllocationType other = (BillPaymentUpdateInputAllocationType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "BillPaymentUpdateInputAllocationType [value=" + value + "]"; + } + + // return an array just like an enum + public static BillPaymentUpdateInputAllocationType[] values() { + synchronized (BillPaymentUpdateInputAllocationType.class) { + return values.values().toArray(new BillPaymentUpdateInputAllocationType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("bill", BILL); + map.put("expense", EXPENSE); + map.put("credit_memo", CREDIT_MEMO); + map.put("over_payment", OVER_PAYMENT); + map.put("pre_payment", PRE_PAYMENT); + map.put("journal_entry", JOURNAL_ENTRY); + map.put("other", OTHER); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("bill", BillPaymentUpdateInputAllocationTypeEnum.BILL); + map.put("expense", BillPaymentUpdateInputAllocationTypeEnum.EXPENSE); + map.put("credit_memo", BillPaymentUpdateInputAllocationTypeEnum.CREDIT_MEMO); + map.put("over_payment", BillPaymentUpdateInputAllocationTypeEnum.OVER_PAYMENT); + map.put("pre_payment", BillPaymentUpdateInputAllocationTypeEnum.PRE_PAYMENT); + map.put("journal_entry", BillPaymentUpdateInputAllocationTypeEnum.JOURNAL_ENTRY); + map.put("other", BillPaymentUpdateInputAllocationTypeEnum.OTHER); + return map; + } + + + public enum BillPaymentUpdateInputAllocationTypeEnum { + + BILL("bill"), + EXPENSE("expense"), + CREDIT_MEMO("credit_memo"), + OVER_PAYMENT("over_payment"), + PRE_PAYMENT("pre_payment"), + JOURNAL_ENTRY("journal_entry"), + OTHER("other"),; + + private final String value; + + private BillPaymentUpdateInputAllocationTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocations.java b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocations.java new file mode 100644 index 000000000..f38b2457a --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputAllocations.java @@ -0,0 +1,319 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class BillPaymentUpdateInputAllocations { + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private JsonNullable id; + + /** + * Type of entity this payment should be attributed to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * Amount of payment that should be attributed to this allocation. If null, the total_amount will be + * used. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("amount") + private JsonNullable amount; + + /** + * Unique identifier of the allocation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allocation_id") + private Optional allocationId; + + @JsonCreator + public BillPaymentUpdateInputAllocations( + @JsonProperty("id") JsonNullable id, + @JsonProperty("type") Optional type, + @JsonProperty("amount") JsonNullable amount, + @JsonProperty("allocation_id") Optional allocationId) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(amount, "amount"); + Utils.checkNotNull(allocationId, "allocationId"); + this.id = id; + this.type = type; + this.amount = amount; + this.allocationId = allocationId; + } + + public BillPaymentUpdateInputAllocations() { + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + Optional.empty()); + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable id() { + return id; + } + + /** + * Type of entity this payment should be attributed to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * Amount of payment that should be attributed to this allocation. If null, the total_amount will be + * used. + */ + @JsonIgnore + public JsonNullable amount() { + return amount; + } + + /** + * Unique identifier of the allocation + */ + @JsonIgnore + public Optional allocationId() { + return allocationId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for an object. + */ + public BillPaymentUpdateInputAllocations withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = JsonNullable.of(id); + return this; + } + + /** + * A unique identifier for an object. + */ + public BillPaymentUpdateInputAllocations withId(JsonNullable id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Type of entity this payment should be attributed to. + */ + public BillPaymentUpdateInputAllocations withType(BillPaymentUpdateInputAllocationType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Type of entity this payment should be attributed to. + */ + public BillPaymentUpdateInputAllocations withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Amount of payment that should be attributed to this allocation. If null, the total_amount will be + * used. + */ + public BillPaymentUpdateInputAllocations withAmount(double amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = JsonNullable.of(amount); + return this; + } + + /** + * Amount of payment that should be attributed to this allocation. If null, the total_amount will be + * used. + */ + public BillPaymentUpdateInputAllocations withAmount(JsonNullable amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + /** + * Unique identifier of the allocation + */ + public BillPaymentUpdateInputAllocations withAllocationId(String allocationId) { + Utils.checkNotNull(allocationId, "allocationId"); + this.allocationId = Optional.ofNullable(allocationId); + return this; + } + + + /** + * Unique identifier of the allocation + */ + public BillPaymentUpdateInputAllocations withAllocationId(Optional allocationId) { + Utils.checkNotNull(allocationId, "allocationId"); + this.allocationId = allocationId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BillPaymentUpdateInputAllocations other = (BillPaymentUpdateInputAllocations) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.allocationId, other.allocationId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, type, amount, + allocationId); + } + + @Override + public String toString() { + return Utils.toString(BillPaymentUpdateInputAllocations.class, + "id", id, + "type", type, + "amount", amount, + "allocationId", allocationId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable id = JsonNullable.undefined(); + + private Optional type = Optional.empty(); + + private JsonNullable amount = JsonNullable.undefined(); + + private Optional allocationId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for an object. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = JsonNullable.of(id); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder id(JsonNullable id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Type of entity this payment should be attributed to. + */ + public Builder type(BillPaymentUpdateInputAllocationType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Type of entity this payment should be attributed to. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * Amount of payment that should be attributed to this allocation. If null, the total_amount will be + * used. + */ + public Builder amount(double amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = JsonNullable.of(amount); + return this; + } + + /** + * Amount of payment that should be attributed to this allocation. If null, the total_amount will be + * used. + */ + public Builder amount(JsonNullable amount) { + Utils.checkNotNull(amount, "amount"); + this.amount = amount; + return this; + } + + + /** + * Unique identifier of the allocation + */ + public Builder allocationId(String allocationId) { + Utils.checkNotNull(allocationId, "allocationId"); + this.allocationId = Optional.ofNullable(allocationId); + return this; + } + + /** + * Unique identifier of the allocation + */ + public Builder allocationId(Optional allocationId) { + Utils.checkNotNull(allocationId, "allocationId"); + this.allocationId = allocationId; + return this; + } + + public BillPaymentUpdateInputAllocations build() { + + return new BillPaymentUpdateInputAllocations( + id, type, amount, + allocationId); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputBillPaymentType.java b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputBillPaymentType.java new file mode 100644 index 000000000..eb2bec3f7 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/BillPaymentUpdateInputBillPaymentType.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * BillPaymentUpdateInputBillPaymentType + * + *

Type of payment + */ +public class BillPaymentUpdateInputBillPaymentType { + + public static final BillPaymentUpdateInputBillPaymentType ACCOUNTS_PAYABLE_CREDIT = new BillPaymentUpdateInputBillPaymentType("accounts_payable_credit"); + public static final BillPaymentUpdateInputBillPaymentType ACCOUNTS_PAYABLE_OVERPAYMENT = new BillPaymentUpdateInputBillPaymentType("accounts_payable_overpayment"); + public static final BillPaymentUpdateInputBillPaymentType ACCOUNTS_PAYABLE_PREPAYMENT = new BillPaymentUpdateInputBillPaymentType("accounts_payable_prepayment"); + public static final BillPaymentUpdateInputBillPaymentType ACCOUNTS_PAYABLE = new BillPaymentUpdateInputBillPaymentType("accounts_payable"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private BillPaymentUpdateInputBillPaymentType(String value) { + this.value = value; + } + + /** + * Returns a BillPaymentUpdateInputBillPaymentType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as BillPaymentUpdateInputBillPaymentType + */ + @JsonCreator + public static BillPaymentUpdateInputBillPaymentType of(String value) { + synchronized (BillPaymentUpdateInputBillPaymentType.class) { + return values.computeIfAbsent(value, v -> new BillPaymentUpdateInputBillPaymentType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BillPaymentUpdateInputBillPaymentType other = (BillPaymentUpdateInputBillPaymentType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "BillPaymentUpdateInputBillPaymentType [value=" + value + "]"; + } + + // return an array just like an enum + public static BillPaymentUpdateInputBillPaymentType[] values() { + synchronized (BillPaymentUpdateInputBillPaymentType.class) { + return values.values().toArray(new BillPaymentUpdateInputBillPaymentType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("accounts_payable_credit", ACCOUNTS_PAYABLE_CREDIT); + map.put("accounts_payable_overpayment", ACCOUNTS_PAYABLE_OVERPAYMENT); + map.put("accounts_payable_prepayment", ACCOUNTS_PAYABLE_PREPAYMENT); + map.put("accounts_payable", ACCOUNTS_PAYABLE); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("accounts_payable_credit", BillPaymentUpdateInputBillPaymentTypeEnum.ACCOUNTS_PAYABLE_CREDIT); + map.put("accounts_payable_overpayment", BillPaymentUpdateInputBillPaymentTypeEnum.ACCOUNTS_PAYABLE_OVERPAYMENT); + map.put("accounts_payable_prepayment", BillPaymentUpdateInputBillPaymentTypeEnum.ACCOUNTS_PAYABLE_PREPAYMENT); + map.put("accounts_payable", BillPaymentUpdateInputBillPaymentTypeEnum.ACCOUNTS_PAYABLE); + return map; + } + + + public enum BillPaymentUpdateInputBillPaymentTypeEnum { + + ACCOUNTS_PAYABLE_CREDIT("accounts_payable_credit"), + ACCOUNTS_PAYABLE_OVERPAYMENT("accounts_payable_overpayment"), + ACCOUNTS_PAYABLE_PREPAYMENT("accounts_payable_prepayment"), + ACCOUNTS_PAYABLE("accounts_payable"),; + + private final String value; + + private BillPaymentUpdateInputBillPaymentTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInput.java b/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInput.java new file mode 100644 index 000000000..04e65c110 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInput.java @@ -0,0 +1,1938 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * CreditNoteUpdateInput + * + *

The writable shape of CreditNote for a single-record update. Identical to the model with the + * read-only properties removed and no required properties, because PATCH is partial and the API + * already validates it that way. + */ +public class CreditNoteUpdateInput { + /** + * Credit note number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subsidiary") + private JsonNullable subsidiary; + + /** + * The ID of the location + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location_id") + private JsonNullable locationId; + + /** + * The ID of the department + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department_id") + private JsonNullable departmentId; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Sub-total amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * Amount of transaction + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private Optional totalAmount; + + /** + * Total tax amount applied to this invoice. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_code") + private JsonNullable taxCode; + + /** + * The balance reflecting any payments made against the transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("balance") + private JsonNullable balance; + + /** + * Indicates the total credit amount still available to apply towards the payment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("remaining_credit") + private JsonNullable remainingCredit; + + /** + * Status of credit notes + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * Optional reference message ie: Debit remittance detail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + /** + * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("date_issued") + private Optional dateIssued; + + /** + * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("date_paid") + private JsonNullable datePaid; + + /** + * Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allocations") + private Optional> allocations; + + /** + * Optional note to be associated with the credit note. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Optional terms to be associated with the credit note. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("terms") + private JsonNullable terms; + + /** + * The ID of the payment terms + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("terms_id") + private JsonNullable termsId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("billing_address") + private Optional billingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("shipping_address") + private Optional shippingAddress; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public CreditNoteUpdateInput( + @JsonProperty("number") JsonNullable number, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("subsidiary") JsonNullable subsidiary, + @JsonProperty("location_id") JsonNullable locationId, + @JsonProperty("department_id") JsonNullable departmentId, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_amount") Optional totalAmount, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("tax_code") JsonNullable taxCode, + @JsonProperty("balance") JsonNullable balance, + @JsonProperty("remaining_credit") JsonNullable remainingCredit, + @JsonProperty("status") Optional status, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("date_issued") Optional dateIssued, + @JsonProperty("date_paid") JsonNullable datePaid, + @JsonProperty("type") Optional type, + @JsonProperty("account") JsonNullable account, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("allocations") Optional> allocations, + @JsonProperty("note") JsonNullable note, + @JsonProperty("terms") JsonNullable terms, + @JsonProperty("terms_id") JsonNullable termsId, + @JsonProperty("billing_address") Optional billingAddress, + @JsonProperty("shipping_address") Optional shippingAddress, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(subsidiary, "subsidiary"); + Utils.checkNotNull(locationId, "locationId"); + Utils.checkNotNull(departmentId, "departmentId"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(taxCode, "taxCode"); + Utils.checkNotNull(balance, "balance"); + Utils.checkNotNull(remainingCredit, "remainingCredit"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(dateIssued, "dateIssued"); + Utils.checkNotNull(datePaid, "datePaid"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(allocations, "allocations"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(terms, "terms"); + Utils.checkNotNull(termsId, "termsId"); + Utils.checkNotNull(billingAddress, "billingAddress"); + Utils.checkNotNull(shippingAddress, "shippingAddress"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.number = number; + this.customer = customer; + this.companyId = companyId; + this.subsidiary = subsidiary; + this.locationId = locationId; + this.departmentId = departmentId; + this.currency = currency; + this.currencyRate = currencyRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalAmount = totalAmount; + this.totalTax = totalTax; + this.taxCode = taxCode; + this.balance = balance; + this.remainingCredit = remainingCredit; + this.status = status; + this.reference = reference; + this.dateIssued = dateIssued; + this.datePaid = datePaid; + this.type = type; + this.account = account; + this.lineItems = lineItems; + this.allocations = allocations; + this.note = note; + this.terms = terms; + this.termsId = termsId; + this.billingAddress = billingAddress; + this.shippingAddress = shippingAddress; + this.trackingCategories = trackingCategories; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public CreditNoteUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * Credit note number. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable subsidiary() { + return (JsonNullable) subsidiary; + } + + /** + * The ID of the location + */ + @JsonIgnore + public JsonNullable locationId() { + return locationId; + } + + /** + * The ID of the department + */ + @JsonIgnore + public JsonNullable departmentId() { + return departmentId; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Sub-total amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * Amount of transaction + */ + @JsonIgnore + public Optional totalAmount() { + return totalAmount; + } + + /** + * Total tax amount applied to this invoice. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonIgnore + public JsonNullable taxCode() { + return taxCode; + } + + /** + * The balance reflecting any payments made against the transaction. + */ + @JsonIgnore + public JsonNullable balance() { + return balance; + } + + /** + * Indicates the total credit amount still available to apply towards the payment. + */ + @JsonIgnore + public JsonNullable remainingCredit() { + return remainingCredit; + } + + /** + * Status of credit notes + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * Optional reference message ie: Debit remittance detail. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + /** + * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public Optional dateIssued() { + return dateIssued; + } + + /** + * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable datePaid() { + return datePaid; + } + + /** + * Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> allocations() { + return (Optional>) allocations; + } + + /** + * Optional note to be associated with the credit note. + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Optional terms to be associated with the credit note. + */ + @JsonIgnore + public JsonNullable terms() { + return terms; + } + + /** + * The ID of the payment terms + */ + @JsonIgnore + public JsonNullable termsId() { + return termsId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional

billingAddress() { + return (Optional
) billingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional
shippingAddress() { + return (Optional
) shippingAddress; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Credit note number. + */ + public CreditNoteUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Credit note number. + */ + public CreditNoteUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The customer this entity is linked to. + */ + public CreditNoteUpdateInput withCustomer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public CreditNoteUpdateInput withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public CreditNoteUpdateInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public CreditNoteUpdateInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public CreditNoteUpdateInput withSubsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public CreditNoteUpdateInput withSubsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + /** + * The ID of the location + */ + public CreditNoteUpdateInput withLocationId(String locationId) { + Utils.checkNotNull(locationId, "locationId"); + this.locationId = JsonNullable.of(locationId); + return this; + } + + /** + * The ID of the location + */ + public CreditNoteUpdateInput withLocationId(JsonNullable locationId) { + Utils.checkNotNull(locationId, "locationId"); + this.locationId = locationId; + return this; + } + + /** + * The ID of the department + */ + public CreditNoteUpdateInput withDepartmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public CreditNoteUpdateInput withDepartmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public CreditNoteUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public CreditNoteUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public CreditNoteUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public CreditNoteUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * Amounts are including tax + */ + public CreditNoteUpdateInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public CreditNoteUpdateInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Sub-total amount, normally before tax. + */ + public CreditNoteUpdateInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Sub-total amount, normally before tax. + */ + public CreditNoteUpdateInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * Amount of transaction + */ + public CreditNoteUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = Optional.ofNullable(totalAmount); + return this; + } + + + /** + * Amount of transaction + */ + public CreditNoteUpdateInput withTotalAmount(Optional totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Total tax amount applied to this invoice. + */ + public CreditNoteUpdateInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this invoice. + */ + public CreditNoteUpdateInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public CreditNoteUpdateInput withTaxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public CreditNoteUpdateInput withTaxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + /** + * The balance reflecting any payments made against the transaction. + */ + public CreditNoteUpdateInput withBalance(double balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = JsonNullable.of(balance); + return this; + } + + /** + * The balance reflecting any payments made against the transaction. + */ + public CreditNoteUpdateInput withBalance(JsonNullable balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = balance; + return this; + } + + /** + * Indicates the total credit amount still available to apply towards the payment. + */ + public CreditNoteUpdateInput withRemainingCredit(double remainingCredit) { + Utils.checkNotNull(remainingCredit, "remainingCredit"); + this.remainingCredit = JsonNullable.of(remainingCredit); + return this; + } + + /** + * Indicates the total credit amount still available to apply towards the payment. + */ + public CreditNoteUpdateInput withRemainingCredit(JsonNullable remainingCredit) { + Utils.checkNotNull(remainingCredit, "remainingCredit"); + this.remainingCredit = remainingCredit; + return this; + } + + /** + * Status of credit notes + */ + public CreditNoteUpdateInput withStatus(CreditNoteUpdateInputCreditNoteStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * Status of credit notes + */ + public CreditNoteUpdateInput withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Optional reference message ie: Debit remittance detail. + */ + public CreditNoteUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message ie: Debit remittance detail. + */ + public CreditNoteUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + /** + * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD + */ + public CreditNoteUpdateInput withDateIssued(OffsetDateTime dateIssued) { + Utils.checkNotNull(dateIssued, "dateIssued"); + this.dateIssued = Optional.ofNullable(dateIssued); + return this; + } + + + /** + * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD + */ + public CreditNoteUpdateInput withDateIssued(Optional dateIssued) { + Utils.checkNotNull(dateIssued, "dateIssued"); + this.dateIssued = dateIssued; + return this; + } + + /** + * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD + */ + public CreditNoteUpdateInput withDatePaid(OffsetDateTime datePaid) { + Utils.checkNotNull(datePaid, "datePaid"); + this.datePaid = JsonNullable.of(datePaid); + return this; + } + + /** + * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD + */ + public CreditNoteUpdateInput withDatePaid(JsonNullable datePaid) { + Utils.checkNotNull(datePaid, "datePaid"); + this.datePaid = datePaid; + return this; + } + + /** + * Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ + public CreditNoteUpdateInput withType(CreditNoteUpdateInputCreditNoteType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ + public CreditNoteUpdateInput withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public CreditNoteUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public CreditNoteUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public CreditNoteUpdateInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + public CreditNoteUpdateInput withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + public CreditNoteUpdateInput withAllocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + + public CreditNoteUpdateInput withAllocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + /** + * Optional note to be associated with the credit note. + */ + public CreditNoteUpdateInput withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the credit note. + */ + public CreditNoteUpdateInput withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Optional terms to be associated with the credit note. + */ + public CreditNoteUpdateInput withTerms(String terms) { + Utils.checkNotNull(terms, "terms"); + this.terms = JsonNullable.of(terms); + return this; + } + + /** + * Optional terms to be associated with the credit note. + */ + public CreditNoteUpdateInput withTerms(JsonNullable terms) { + Utils.checkNotNull(terms, "terms"); + this.terms = terms; + return this; + } + + /** + * The ID of the payment terms + */ + public CreditNoteUpdateInput withTermsId(String termsId) { + Utils.checkNotNull(termsId, "termsId"); + this.termsId = JsonNullable.of(termsId); + return this; + } + + /** + * The ID of the payment terms + */ + public CreditNoteUpdateInput withTermsId(JsonNullable termsId) { + Utils.checkNotNull(termsId, "termsId"); + this.termsId = termsId; + return this; + } + + public CreditNoteUpdateInput withBillingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + + public CreditNoteUpdateInput withBillingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + public CreditNoteUpdateInput withShippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + + public CreditNoteUpdateInput withShippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + /** + * A list of linked tracking categories. + */ + public CreditNoteUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public CreditNoteUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + public CreditNoteUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public CreditNoteUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public CreditNoteUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public CreditNoteUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public CreditNoteUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public CreditNoteUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreditNoteUpdateInput other = (CreditNoteUpdateInput) o; + return + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.subsidiary, other.subsidiary) && + Utils.enhancedDeepEquals(this.locationId, other.locationId) && + Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.taxCode, other.taxCode) && + Utils.enhancedDeepEquals(this.balance, other.balance) && + Utils.enhancedDeepEquals(this.remainingCredit, other.remainingCredit) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.dateIssued, other.dateIssued) && + Utils.enhancedDeepEquals(this.datePaid, other.datePaid) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.allocations, other.allocations) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.terms, other.terms) && + Utils.enhancedDeepEquals(this.termsId, other.termsId) && + Utils.enhancedDeepEquals(this.billingAddress, other.billingAddress) && + Utils.enhancedDeepEquals(this.shippingAddress, other.shippingAddress) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + number, customer, companyId, + subsidiary, locationId, departmentId, + currency, currencyRate, taxInclusive, + subTotal, totalAmount, totalTax, + taxCode, balance, remainingCredit, + status, reference, dateIssued, + datePaid, type, account, + lineItems, allocations, note, + terms, termsId, billingAddress, + shippingAddress, trackingCategories, customFields, + rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(CreditNoteUpdateInput.class, + "number", number, + "customer", customer, + "companyId", companyId, + "subsidiary", subsidiary, + "locationId", locationId, + "departmentId", departmentId, + "currency", currency, + "currencyRate", currencyRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalAmount", totalAmount, + "totalTax", totalTax, + "taxCode", taxCode, + "balance", balance, + "remainingCredit", remainingCredit, + "status", status, + "reference", reference, + "dateIssued", dateIssued, + "datePaid", datePaid, + "type", type, + "account", account, + "lineItems", lineItems, + "allocations", allocations, + "note", note, + "terms", terms, + "termsId", termsId, + "billingAddress", billingAddress, + "shippingAddress", shippingAddress, + "trackingCategories", trackingCategories, + "customFields", customFields, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable subsidiary = JsonNullable.undefined(); + + private JsonNullable locationId = JsonNullable.undefined(); + + private JsonNullable departmentId = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private Optional totalAmount = Optional.empty(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable taxCode = JsonNullable.undefined(); + + private JsonNullable balance = JsonNullable.undefined(); + + private JsonNullable remainingCredit = JsonNullable.undefined(); + + private Optional status = Optional.empty(); + + private JsonNullable reference = JsonNullable.undefined(); + + private Optional dateIssued = Optional.empty(); + + private JsonNullable datePaid = JsonNullable.undefined(); + + private Optional type = Optional.empty(); + + private JsonNullable account = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private Optional> allocations = Optional.empty(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable terms = JsonNullable.undefined(); + + private JsonNullable termsId = JsonNullable.undefined(); + + private Optional billingAddress = Optional.empty(); + + private Optional shippingAddress = Optional.empty(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Credit note number. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Credit note number. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + public Builder subsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public Builder subsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + + /** + * The ID of the location + */ + public Builder locationId(String locationId) { + Utils.checkNotNull(locationId, "locationId"); + this.locationId = JsonNullable.of(locationId); + return this; + } + + /** + * The ID of the location + */ + public Builder locationId(JsonNullable locationId) { + Utils.checkNotNull(locationId, "locationId"); + this.locationId = locationId; + return this; + } + + + /** + * The ID of the department + */ + public Builder departmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public Builder departmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Sub-total amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Sub-total amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * Amount of transaction + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = Optional.ofNullable(totalAmount); + return this; + } + + /** + * Amount of transaction + */ + public Builder totalAmount(Optional totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Total tax amount applied to this invoice. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this invoice. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + + /** + * The balance reflecting any payments made against the transaction. + */ + public Builder balance(double balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = JsonNullable.of(balance); + return this; + } + + /** + * The balance reflecting any payments made against the transaction. + */ + public Builder balance(JsonNullable balance) { + Utils.checkNotNull(balance, "balance"); + this.balance = balance; + return this; + } + + + /** + * Indicates the total credit amount still available to apply towards the payment. + */ + public Builder remainingCredit(double remainingCredit) { + Utils.checkNotNull(remainingCredit, "remainingCredit"); + this.remainingCredit = JsonNullable.of(remainingCredit); + return this; + } + + /** + * Indicates the total credit amount still available to apply towards the payment. + */ + public Builder remainingCredit(JsonNullable remainingCredit) { + Utils.checkNotNull(remainingCredit, "remainingCredit"); + this.remainingCredit = remainingCredit; + return this; + } + + + /** + * Status of credit notes + */ + public Builder status(CreditNoteUpdateInputCreditNoteStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Status of credit notes + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Optional reference message ie: Debit remittance detail. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message ie: Debit remittance detail. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + /** + * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder dateIssued(OffsetDateTime dateIssued) { + Utils.checkNotNull(dateIssued, "dateIssued"); + this.dateIssued = Optional.ofNullable(dateIssued); + return this; + } + + /** + * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder dateIssued(Optional dateIssued) { + Utils.checkNotNull(dateIssued, "dateIssued"); + this.dateIssued = dateIssued; + return this; + } + + + /** + * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder datePaid(OffsetDateTime datePaid) { + Utils.checkNotNull(datePaid, "datePaid"); + this.datePaid = JsonNullable.of(datePaid); + return this; + } + + /** + * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder datePaid(JsonNullable datePaid) { + Utils.checkNotNull(datePaid, "datePaid"); + this.datePaid = datePaid; + return this; + } + + + /** + * Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ + public Builder type(CreditNoteUpdateInputCreditNoteType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + public Builder allocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + public Builder allocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + + /** + * Optional note to be associated with the credit note. + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the credit note. + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Optional terms to be associated with the credit note. + */ + public Builder terms(String terms) { + Utils.checkNotNull(terms, "terms"); + this.terms = JsonNullable.of(terms); + return this; + } + + /** + * Optional terms to be associated with the credit note. + */ + public Builder terms(JsonNullable terms) { + Utils.checkNotNull(terms, "terms"); + this.terms = terms; + return this; + } + + + /** + * The ID of the payment terms + */ + public Builder termsId(String termsId) { + Utils.checkNotNull(termsId, "termsId"); + this.termsId = JsonNullable.of(termsId); + return this; + } + + /** + * The ID of the payment terms + */ + public Builder termsId(JsonNullable termsId) { + Utils.checkNotNull(termsId, "termsId"); + this.termsId = termsId; + return this; + } + + + public Builder billingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + public Builder billingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + + public Builder shippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + public Builder shippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public CreditNoteUpdateInput build() { + + return new CreditNoteUpdateInput( + number, customer, companyId, + subsidiary, locationId, departmentId, + currency, currencyRate, taxInclusive, + subTotal, totalAmount, totalTax, + taxCode, balance, remainingCredit, + status, reference, dateIssued, + datePaid, type, account, + lineItems, allocations, note, + terms, termsId, billingAddress, + shippingAddress, trackingCategories, customFields, + rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteStatus.java b/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteStatus.java new file mode 100644 index 000000000..bc667b669 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteStatus.java @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * CreditNoteUpdateInputCreditNoteStatus + * + *

Status of credit notes + */ +public class CreditNoteUpdateInputCreditNoteStatus { + + public static final CreditNoteUpdateInputCreditNoteStatus DRAFT = new CreditNoteUpdateInputCreditNoteStatus("draft"); + public static final CreditNoteUpdateInputCreditNoteStatus AUTHORISED = new CreditNoteUpdateInputCreditNoteStatus("authorised"); + public static final CreditNoteUpdateInputCreditNoteStatus POSTED = new CreditNoteUpdateInputCreditNoteStatus("posted"); + public static final CreditNoteUpdateInputCreditNoteStatus PARTIALLY_PAID = new CreditNoteUpdateInputCreditNoteStatus("partially_paid"); + public static final CreditNoteUpdateInputCreditNoteStatus PAID = new CreditNoteUpdateInputCreditNoteStatus("paid"); + public static final CreditNoteUpdateInputCreditNoteStatus VOIDED = new CreditNoteUpdateInputCreditNoteStatus("voided"); + public static final CreditNoteUpdateInputCreditNoteStatus DELETED = new CreditNoteUpdateInputCreditNoteStatus("deleted"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private CreditNoteUpdateInputCreditNoteStatus(String value) { + this.value = value; + } + + /** + * Returns a CreditNoteUpdateInputCreditNoteStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as CreditNoteUpdateInputCreditNoteStatus + */ + @JsonCreator + public static CreditNoteUpdateInputCreditNoteStatus of(String value) { + synchronized (CreditNoteUpdateInputCreditNoteStatus.class) { + return values.computeIfAbsent(value, v -> new CreditNoteUpdateInputCreditNoteStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + CreditNoteUpdateInputCreditNoteStatus other = (CreditNoteUpdateInputCreditNoteStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "CreditNoteUpdateInputCreditNoteStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static CreditNoteUpdateInputCreditNoteStatus[] values() { + synchronized (CreditNoteUpdateInputCreditNoteStatus.class) { + return values.values().toArray(new CreditNoteUpdateInputCreditNoteStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("draft", DRAFT); + map.put("authorised", AUTHORISED); + map.put("posted", POSTED); + map.put("partially_paid", PARTIALLY_PAID); + map.put("paid", PAID); + map.put("voided", VOIDED); + map.put("deleted", DELETED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("draft", CreditNoteUpdateInputCreditNoteStatusEnum.DRAFT); + map.put("authorised", CreditNoteUpdateInputCreditNoteStatusEnum.AUTHORISED); + map.put("posted", CreditNoteUpdateInputCreditNoteStatusEnum.POSTED); + map.put("partially_paid", CreditNoteUpdateInputCreditNoteStatusEnum.PARTIALLY_PAID); + map.put("paid", CreditNoteUpdateInputCreditNoteStatusEnum.PAID); + map.put("voided", CreditNoteUpdateInputCreditNoteStatusEnum.VOIDED); + map.put("deleted", CreditNoteUpdateInputCreditNoteStatusEnum.DELETED); + return map; + } + + + public enum CreditNoteUpdateInputCreditNoteStatusEnum { + + DRAFT("draft"), + AUTHORISED("authorised"), + POSTED("posted"), + PARTIALLY_PAID("partially_paid"), + PAID("paid"), + VOIDED("voided"), + DELETED("deleted"),; + + private final String value; + + private CreditNoteUpdateInputCreditNoteStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteType.java b/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteType.java new file mode 100644 index 000000000..58be7d0df --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/CreditNoteUpdateInputCreditNoteType.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * CreditNoteUpdateInputCreditNoteType + * + *

Whether this credit note reduces an amount owed by a customer (accounts receivable) or owed to a + * supplier (accounts payable). `accounts_payable_credit` support is connector-specific — most + * connectors only expose the accounts-receivable side. Check the connector's gotchas for known + * deviations. + */ +public class CreditNoteUpdateInputCreditNoteType { + + public static final CreditNoteUpdateInputCreditNoteType ACCOUNTS_RECEIVABLE_CREDIT = new CreditNoteUpdateInputCreditNoteType("accounts_receivable_credit"); + public static final CreditNoteUpdateInputCreditNoteType ACCOUNTS_PAYABLE_CREDIT = new CreditNoteUpdateInputCreditNoteType("accounts_payable_credit"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private CreditNoteUpdateInputCreditNoteType(String value) { + this.value = value; + } + + /** + * Returns a CreditNoteUpdateInputCreditNoteType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as CreditNoteUpdateInputCreditNoteType + */ + @JsonCreator + public static CreditNoteUpdateInputCreditNoteType of(String value) { + synchronized (CreditNoteUpdateInputCreditNoteType.class) { + return values.computeIfAbsent(value, v -> new CreditNoteUpdateInputCreditNoteType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + CreditNoteUpdateInputCreditNoteType other = (CreditNoteUpdateInputCreditNoteType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "CreditNoteUpdateInputCreditNoteType [value=" + value + "]"; + } + + // return an array just like an enum + public static CreditNoteUpdateInputCreditNoteType[] values() { + synchronized (CreditNoteUpdateInputCreditNoteType.class) { + return values.values().toArray(new CreditNoteUpdateInputCreditNoteType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("accounts_receivable_credit", ACCOUNTS_RECEIVABLE_CREDIT); + map.put("accounts_payable_credit", ACCOUNTS_PAYABLE_CREDIT); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("accounts_receivable_credit", CreditNoteUpdateInputCreditNoteTypeEnum.ACCOUNTS_RECEIVABLE_CREDIT); + map.put("accounts_payable_credit", CreditNoteUpdateInputCreditNoteTypeEnum.ACCOUNTS_PAYABLE_CREDIT); + return map; + } + + + public enum CreditNoteUpdateInputCreditNoteTypeEnum { + + ACCOUNTS_RECEIVABLE_CREDIT("accounts_receivable_credit"), + ACCOUNTS_PAYABLE_CREDIT("accounts_payable_credit"),; + + private final String value; + + private CreditNoteUpdateInputCreditNoteTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInput.java b/src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInput.java new file mode 100644 index 000000000..f55cef088 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInput.java @@ -0,0 +1,765 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ExpenseCategoryUpdateInput + * + *

The writable shape of ExpenseCategory for a single-record update. Identical to the model with the + * read-only properties removed and no required properties, because PATCH is partial and the API + * already validates it that way. + */ +public class ExpenseCategoryUpdateInput { + /** + * Id to be displayed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_id") + private JsonNullable displayId; + + /** + * The name of the expense category. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * The code or external identifier of the expense category. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("code") + private JsonNullable code; + + /** + * The description of the expense category. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("description") + private JsonNullable description; + + /** + * The status of the expense category. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("offset_account") + private JsonNullable offsetAccount; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_rate") + private Optional taxRate; + + /** + * Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("rate_required") + private JsonNullable rateRequired; + + /** + * Default rate when rate_required is true (e.g. 0.67 for mileage). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default_rate") + private JsonNullable defaultRate; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public ExpenseCategoryUpdateInput( + @JsonProperty("display_id") JsonNullable displayId, + @JsonProperty("name") Optional name, + @JsonProperty("code") JsonNullable code, + @JsonProperty("description") JsonNullable description, + @JsonProperty("status") JsonNullable status, + @JsonProperty("account") JsonNullable account, + @JsonProperty("offset_account") JsonNullable offsetAccount, + @JsonProperty("tax_rate") Optional taxRate, + @JsonProperty("rate_required") JsonNullable rateRequired, + @JsonProperty("default_rate") JsonNullable defaultRate, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(displayId, "displayId"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(code, "code"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(offsetAccount, "offsetAccount"); + Utils.checkNotNull(taxRate, "taxRate"); + Utils.checkNotNull(rateRequired, "rateRequired"); + Utils.checkNotNull(defaultRate, "defaultRate"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.displayId = displayId; + this.name = name; + this.code = code; + this.description = description; + this.status = status; + this.account = account; + this.offsetAccount = offsetAccount; + this.taxRate = taxRate; + this.rateRequired = rateRequired; + this.defaultRate = defaultRate; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public ExpenseCategoryUpdateInput() { + this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); + } + + /** + * Id to be displayed. + */ + @JsonIgnore + public JsonNullable displayId() { + return displayId; + } + + /** + * The name of the expense category. + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * The code or external identifier of the expense category. + */ + @JsonIgnore + public JsonNullable code() { + return code; + } + + /** + * The description of the expense category. + */ + @JsonIgnore + public JsonNullable description() { + return description; + } + + /** + * The status of the expense category. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable offsetAccount() { + return (JsonNullable) offsetAccount; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional taxRate() { + return (Optional) taxRate; + } + + /** + * Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + */ + @JsonIgnore + public JsonNullable rateRequired() { + return rateRequired; + } + + /** + * Default rate when rate_required is true (e.g. 0.67 for mileage). + */ + @JsonIgnore + public JsonNullable defaultRate() { + return defaultRate; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Id to be displayed. + */ + public ExpenseCategoryUpdateInput withDisplayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public ExpenseCategoryUpdateInput withDisplayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + /** + * The name of the expense category. + */ + public ExpenseCategoryUpdateInput withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * The name of the expense category. + */ + public ExpenseCategoryUpdateInput withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * The code or external identifier of the expense category. + */ + public ExpenseCategoryUpdateInput withCode(String code) { + Utils.checkNotNull(code, "code"); + this.code = JsonNullable.of(code); + return this; + } + + /** + * The code or external identifier of the expense category. + */ + public ExpenseCategoryUpdateInput withCode(JsonNullable code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + /** + * The description of the expense category. + */ + public ExpenseCategoryUpdateInput withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = JsonNullable.of(description); + return this; + } + + /** + * The description of the expense category. + */ + public ExpenseCategoryUpdateInput withDescription(JsonNullable description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * The status of the expense category. + */ + public ExpenseCategoryUpdateInput withStatus(ExpenseCategoryUpdateInputStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the expense category. + */ + public ExpenseCategoryUpdateInput withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public ExpenseCategoryUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public ExpenseCategoryUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + public ExpenseCategoryUpdateInput withOffsetAccount(LinkedLedgerAccount offsetAccount) { + Utils.checkNotNull(offsetAccount, "offsetAccount"); + this.offsetAccount = JsonNullable.of(offsetAccount); + return this; + } + + public ExpenseCategoryUpdateInput withOffsetAccount(JsonNullable offsetAccount) { + Utils.checkNotNull(offsetAccount, "offsetAccount"); + this.offsetAccount = offsetAccount; + return this; + } + + public ExpenseCategoryUpdateInput withTaxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + + public ExpenseCategoryUpdateInput withTaxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + /** + * Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + */ + public ExpenseCategoryUpdateInput withRateRequired(boolean rateRequired) { + Utils.checkNotNull(rateRequired, "rateRequired"); + this.rateRequired = JsonNullable.of(rateRequired); + return this; + } + + /** + * Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + */ + public ExpenseCategoryUpdateInput withRateRequired(JsonNullable rateRequired) { + Utils.checkNotNull(rateRequired, "rateRequired"); + this.rateRequired = rateRequired; + return this; + } + + /** + * Default rate when rate_required is true (e.g. 0.67 for mileage). + */ + public ExpenseCategoryUpdateInput withDefaultRate(double defaultRate) { + Utils.checkNotNull(defaultRate, "defaultRate"); + this.defaultRate = JsonNullable.of(defaultRate); + return this; + } + + /** + * Default rate when rate_required is true (e.g. 0.67 for mileage). + */ + public ExpenseCategoryUpdateInput withDefaultRate(JsonNullable defaultRate) { + Utils.checkNotNull(defaultRate, "defaultRate"); + this.defaultRate = defaultRate; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseCategoryUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseCategoryUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseCategoryUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseCategoryUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExpenseCategoryUpdateInput other = (ExpenseCategoryUpdateInput) o; + return + Utils.enhancedDeepEquals(this.displayId, other.displayId) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.code, other.code) && + Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.offsetAccount, other.offsetAccount) && + Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && + Utils.enhancedDeepEquals(this.rateRequired, other.rateRequired) && + Utils.enhancedDeepEquals(this.defaultRate, other.defaultRate) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + displayId, name, code, + description, status, account, + offsetAccount, taxRate, rateRequired, + defaultRate, rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(ExpenseCategoryUpdateInput.class, + "displayId", displayId, + "name", name, + "code", code, + "description", description, + "status", status, + "account", account, + "offsetAccount", offsetAccount, + "taxRate", taxRate, + "rateRequired", rateRequired, + "defaultRate", defaultRate, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable displayId = JsonNullable.undefined(); + + private Optional name = Optional.empty(); + + private JsonNullable code = JsonNullable.undefined(); + + private JsonNullable description = JsonNullable.undefined(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private JsonNullable offsetAccount = JsonNullable.undefined(); + + private Optional taxRate = Optional.empty(); + + private JsonNullable rateRequired = JsonNullable.undefined(); + + private JsonNullable defaultRate = JsonNullable.undefined(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Id to be displayed. + */ + public Builder displayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public Builder displayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + + /** + * The name of the expense category. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the expense category. + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * The code or external identifier of the expense category. + */ + public Builder code(String code) { + Utils.checkNotNull(code, "code"); + this.code = JsonNullable.of(code); + return this; + } + + /** + * The code or external identifier of the expense category. + */ + public Builder code(JsonNullable code) { + Utils.checkNotNull(code, "code"); + this.code = code; + return this; + } + + + /** + * The description of the expense category. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = JsonNullable.of(description); + return this; + } + + /** + * The description of the expense category. + */ + public Builder description(JsonNullable description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + + /** + * The status of the expense category. + */ + public Builder status(ExpenseCategoryUpdateInputStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the expense category. + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + public Builder offsetAccount(LinkedLedgerAccount offsetAccount) { + Utils.checkNotNull(offsetAccount, "offsetAccount"); + this.offsetAccount = JsonNullable.of(offsetAccount); + return this; + } + + public Builder offsetAccount(JsonNullable offsetAccount) { + Utils.checkNotNull(offsetAccount, "offsetAccount"); + this.offsetAccount = offsetAccount; + return this; + } + + + public Builder taxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + public Builder taxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + + /** + * Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + */ + public Builder rateRequired(boolean rateRequired) { + Utils.checkNotNull(rateRequired, "rateRequired"); + this.rateRequired = JsonNullable.of(rateRequired); + return this; + } + + /** + * Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + */ + public Builder rateRequired(JsonNullable rateRequired) { + Utils.checkNotNull(rateRequired, "rateRequired"); + this.rateRequired = rateRequired; + return this; + } + + + /** + * Default rate when rate_required is true (e.g. 0.67 for mileage). + */ + public Builder defaultRate(double defaultRate) { + Utils.checkNotNull(defaultRate, "defaultRate"); + this.defaultRate = JsonNullable.of(defaultRate); + return this; + } + + /** + * Default rate when rate_required is true (e.g. 0.67 for mileage). + */ + public Builder defaultRate(JsonNullable defaultRate) { + Utils.checkNotNull(defaultRate, "defaultRate"); + this.defaultRate = defaultRate; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public ExpenseCategoryUpdateInput build() { + + return new ExpenseCategoryUpdateInput( + displayId, name, code, + description, status, account, + offsetAccount, taxRate, rateRequired, + defaultRate, rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInputStatus.java b/src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInputStatus.java new file mode 100644 index 000000000..dae9e7c31 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseCategoryUpdateInputStatus.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ExpenseCategoryUpdateInputStatus + * + *

The status of the expense category. + */ +public class ExpenseCategoryUpdateInputStatus { + + public static final ExpenseCategoryUpdateInputStatus ACTIVE = new ExpenseCategoryUpdateInputStatus("active"); + public static final ExpenseCategoryUpdateInputStatus INACTIVE = new ExpenseCategoryUpdateInputStatus("inactive"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ExpenseCategoryUpdateInputStatus(String value) { + this.value = value; + } + + /** + * Returns a ExpenseCategoryUpdateInputStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ExpenseCategoryUpdateInputStatus + */ + @JsonCreator + public static ExpenseCategoryUpdateInputStatus of(String value) { + synchronized (ExpenseCategoryUpdateInputStatus.class) { + return values.computeIfAbsent(value, v -> new ExpenseCategoryUpdateInputStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ExpenseCategoryUpdateInputStatus other = (ExpenseCategoryUpdateInputStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ExpenseCategoryUpdateInputStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static ExpenseCategoryUpdateInputStatus[] values() { + synchronized (ExpenseCategoryUpdateInputStatus.class) { + return values.values().toArray(new ExpenseCategoryUpdateInputStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("active", ACTIVE); + map.put("inactive", INACTIVE); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("active", ExpenseCategoryUpdateInputStatusEnum.ACTIVE); + map.put("inactive", ExpenseCategoryUpdateInputStatusEnum.INACTIVE); + return map; + } + + + public enum ExpenseCategoryUpdateInputStatusEnum { + + ACTIVE("active"), + INACTIVE("inactive"),; + + private final String value; + + private ExpenseCategoryUpdateInputStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInput.java b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInput.java new file mode 100644 index 000000000..6a1d33c68 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInput.java @@ -0,0 +1,1710 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ExpenseReportUpdateInput + * + *

The writable shape of ExpenseReport for a single-record update. Identical to the model with the + * read-only properties removed and no required properties, because PATCH is partial and the API + * already validates it that way. + */ +public class ExpenseReportUpdateInput { + /** + * Id to be displayed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_id") + private JsonNullable displayId; + + /** + * The expense report number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * Title or purpose of the expense report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("title") + private JsonNullable title; + + /** + * The employee who submitted the expense report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("employee") + private Optional employee; + + /** + * The status of the expense report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * The date the expense report was posted to the general ledger. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("posting_date") + private JsonNullable postingDate; + + /** + * Date when reimbursement is due. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("due_date") + private JsonNullable dueDate; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * Total amount of all expense lines including tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reimbursable_amount") + private JsonNullable reimbursableAmount; + + /** + * The memo of the expense report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("memo") + private JsonNullable memo; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private JsonNullable location; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * The accounting period the expense report is posted to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accounting_period") + private JsonNullable accountingPeriod; + + /** + * Expense line items linked to this expense report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + /** + * Optional reference identifier for the transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subsidiary") + private JsonNullable subsidiary; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * The person who approved the expense report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("approved_by") + private JsonNullable approvedBy; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public ExpenseReportUpdateInput( + @JsonProperty("display_id") JsonNullable displayId, + @JsonProperty("number") JsonNullable number, + @JsonProperty("title") JsonNullable title, + @JsonProperty("employee") Optional employee, + @JsonProperty("status") JsonNullable status, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("posting_date") JsonNullable postingDate, + @JsonProperty("due_date") JsonNullable dueDate, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("reimbursable_amount") JsonNullable reimbursableAmount, + @JsonProperty("memo") JsonNullable memo, + @JsonProperty("department") JsonNullable department, + @JsonProperty("location") JsonNullable location, + @JsonProperty("account") JsonNullable account, + @JsonProperty("accounting_period") JsonNullable accountingPeriod, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("subsidiary") JsonNullable subsidiary, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("approved_by") JsonNullable approvedBy, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(displayId, "displayId"); + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(employee, "employee"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(postingDate, "postingDate"); + Utils.checkNotNull(dueDate, "dueDate"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(reimbursableAmount, "reimbursableAmount"); + Utils.checkNotNull(memo, "memo"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(accountingPeriod, "accountingPeriod"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(subsidiary, "subsidiary"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(approvedBy, "approvedBy"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.displayId = displayId; + this.number = number; + this.title = title; + this.employee = employee; + this.status = status; + this.transactionDate = transactionDate; + this.postingDate = postingDate; + this.dueDate = dueDate; + this.currency = currency; + this.currencyRate = currencyRate; + this.subTotal = subTotal; + this.totalTax = totalTax; + this.totalAmount = totalAmount; + this.reimbursableAmount = reimbursableAmount; + this.memo = memo; + this.department = department; + this.location = location; + this.account = account; + this.accountingPeriod = accountingPeriod; + this.lineItems = lineItems; + this.reference = reference; + this.subsidiary = subsidiary; + this.trackingCategories = trackingCategories; + this.taxInclusive = taxInclusive; + this.approvedBy = approvedBy; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public ExpenseReportUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + Optional.empty()); + } + + /** + * Id to be displayed. + */ + @JsonIgnore + public JsonNullable displayId() { + return displayId; + } + + /** + * The expense report number. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * Title or purpose of the expense report. + */ + @JsonIgnore + public JsonNullable title() { + return title; + } + + /** + * The employee who submitted the expense report. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional employee() { + return (Optional) employee; + } + + /** + * The status of the expense report. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * The date the expense report was posted to the general ledger. + */ + @JsonIgnore + public JsonNullable postingDate() { + return postingDate; + } + + /** + * Date when reimbursement is due. + */ + @JsonIgnore + public JsonNullable dueDate() { + return dueDate; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * Total amount of all expense lines including tax. + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + */ + @JsonIgnore + public JsonNullable reimbursableAmount() { + return reimbursableAmount; + } + + /** + * The memo of the expense report. + */ + @JsonIgnore + public JsonNullable memo() { + return memo; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable location() { + return (JsonNullable) location; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * The accounting period the expense report is posted to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable accountingPeriod() { + return (JsonNullable) accountingPeriod; + } + + /** + * Expense line items linked to this expense report. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + /** + * Optional reference identifier for the transaction. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable subsidiary() { + return (JsonNullable) subsidiary; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * The person who approved the expense report. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable approvedBy() { + return (JsonNullable) approvedBy; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Id to be displayed. + */ + public ExpenseReportUpdateInput withDisplayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public ExpenseReportUpdateInput withDisplayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + /** + * The expense report number. + */ + public ExpenseReportUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * The expense report number. + */ + public ExpenseReportUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * Title or purpose of the expense report. + */ + public ExpenseReportUpdateInput withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = JsonNullable.of(title); + return this; + } + + /** + * Title or purpose of the expense report. + */ + public ExpenseReportUpdateInput withTitle(JsonNullable title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + /** + * The employee who submitted the expense report. + */ + public ExpenseReportUpdateInput withEmployee(ExpenseReportUpdateInputEmployee employee) { + Utils.checkNotNull(employee, "employee"); + this.employee = Optional.ofNullable(employee); + return this; + } + + + /** + * The employee who submitted the expense report. + */ + public ExpenseReportUpdateInput withEmployee(Optional employee) { + Utils.checkNotNull(employee, "employee"); + this.employee = employee; + return this; + } + + /** + * The status of the expense report. + */ + public ExpenseReportUpdateInput withStatus(ExpenseReportUpdateInputStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the expense report. + */ + public ExpenseReportUpdateInput withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public ExpenseReportUpdateInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public ExpenseReportUpdateInput withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * The date the expense report was posted to the general ledger. + */ + public ExpenseReportUpdateInput withPostingDate(LocalDate postingDate) { + Utils.checkNotNull(postingDate, "postingDate"); + this.postingDate = JsonNullable.of(postingDate); + return this; + } + + /** + * The date the expense report was posted to the general ledger. + */ + public ExpenseReportUpdateInput withPostingDate(JsonNullable postingDate) { + Utils.checkNotNull(postingDate, "postingDate"); + this.postingDate = postingDate; + return this; + } + + /** + * Date when reimbursement is due. + */ + public ExpenseReportUpdateInput withDueDate(LocalDate dueDate) { + Utils.checkNotNull(dueDate, "dueDate"); + this.dueDate = JsonNullable.of(dueDate); + return this; + } + + /** + * Date when reimbursement is due. + */ + public ExpenseReportUpdateInput withDueDate(JsonNullable dueDate) { + Utils.checkNotNull(dueDate, "dueDate"); + this.dueDate = dueDate; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ExpenseReportUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ExpenseReportUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public ExpenseReportUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public ExpenseReportUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public ExpenseReportUpdateInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public ExpenseReportUpdateInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public ExpenseReportUpdateInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public ExpenseReportUpdateInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * Total amount of all expense lines including tax. + */ + public ExpenseReportUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * Total amount of all expense lines including tax. + */ + public ExpenseReportUpdateInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + */ + public ExpenseReportUpdateInput withReimbursableAmount(double reimbursableAmount) { + Utils.checkNotNull(reimbursableAmount, "reimbursableAmount"); + this.reimbursableAmount = JsonNullable.of(reimbursableAmount); + return this; + } + + /** + * Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + */ + public ExpenseReportUpdateInput withReimbursableAmount(JsonNullable reimbursableAmount) { + Utils.checkNotNull(reimbursableAmount, "reimbursableAmount"); + this.reimbursableAmount = reimbursableAmount; + return this; + } + + /** + * The memo of the expense report. + */ + public ExpenseReportUpdateInput withMemo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense report. + */ + public ExpenseReportUpdateInput withMemo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + public ExpenseReportUpdateInput withDepartment(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public ExpenseReportUpdateInput withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + public ExpenseReportUpdateInput withLocation(LinkedLocationInput location) { + Utils.checkNotNull(location, "location"); + this.location = JsonNullable.of(location); + return this; + } + + public ExpenseReportUpdateInput withLocation(JsonNullable location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public ExpenseReportUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public ExpenseReportUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * The accounting period the expense report is posted to. + */ + public ExpenseReportUpdateInput withAccountingPeriod(ExpenseReportUpdateInputAccountingPeriod accountingPeriod) { + Utils.checkNotNull(accountingPeriod, "accountingPeriod"); + this.accountingPeriod = JsonNullable.of(accountingPeriod); + return this; + } + + /** + * The accounting period the expense report is posted to. + */ + public ExpenseReportUpdateInput withAccountingPeriod(JsonNullable accountingPeriod) { + Utils.checkNotNull(accountingPeriod, "accountingPeriod"); + this.accountingPeriod = accountingPeriod; + return this; + } + + /** + * Expense line items linked to this expense report. + */ + public ExpenseReportUpdateInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + /** + * Expense line items linked to this expense report. + */ + public ExpenseReportUpdateInput withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public ExpenseReportUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public ExpenseReportUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + public ExpenseReportUpdateInput withSubsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public ExpenseReportUpdateInput withSubsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + /** + * A list of linked tracking categories. + */ + public ExpenseReportUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public ExpenseReportUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + /** + * Amounts are including tax + */ + public ExpenseReportUpdateInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public ExpenseReportUpdateInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * The person who approved the expense report. + */ + public ExpenseReportUpdateInput withApprovedBy(ExpenseReportUpdateInputApprovedBy approvedBy) { + Utils.checkNotNull(approvedBy, "approvedBy"); + this.approvedBy = JsonNullable.of(approvedBy); + return this; + } + + /** + * The person who approved the expense report. + */ + public ExpenseReportUpdateInput withApprovedBy(JsonNullable approvedBy) { + Utils.checkNotNull(approvedBy, "approvedBy"); + this.approvedBy = approvedBy; + return this; + } + + public ExpenseReportUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public ExpenseReportUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseReportUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseReportUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseReportUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseReportUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExpenseReportUpdateInput other = (ExpenseReportUpdateInput) o; + return + Utils.enhancedDeepEquals(this.displayId, other.displayId) && + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.employee, other.employee) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.postingDate, other.postingDate) && + Utils.enhancedDeepEquals(this.dueDate, other.dueDate) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.reimbursableAmount, other.reimbursableAmount) && + Utils.enhancedDeepEquals(this.memo, other.memo) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.accountingPeriod, other.accountingPeriod) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.subsidiary, other.subsidiary) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.approvedBy, other.approvedBy) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + displayId, number, title, + employee, status, transactionDate, + postingDate, dueDate, currency, + currencyRate, subTotal, totalTax, + totalAmount, reimbursableAmount, memo, + department, location, account, + accountingPeriod, lineItems, reference, + subsidiary, trackingCategories, taxInclusive, + approvedBy, customFields, rowVersion, + passThrough); + } + + @Override + public String toString() { + return Utils.toString(ExpenseReportUpdateInput.class, + "displayId", displayId, + "number", number, + "title", title, + "employee", employee, + "status", status, + "transactionDate", transactionDate, + "postingDate", postingDate, + "dueDate", dueDate, + "currency", currency, + "currencyRate", currencyRate, + "subTotal", subTotal, + "totalTax", totalTax, + "totalAmount", totalAmount, + "reimbursableAmount", reimbursableAmount, + "memo", memo, + "department", department, + "location", location, + "account", account, + "accountingPeriod", accountingPeriod, + "lineItems", lineItems, + "reference", reference, + "subsidiary", subsidiary, + "trackingCategories", trackingCategories, + "taxInclusive", taxInclusive, + "approvedBy", approvedBy, + "customFields", customFields, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable displayId = JsonNullable.undefined(); + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable title = JsonNullable.undefined(); + + private Optional employee = Optional.empty(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + private JsonNullable postingDate = JsonNullable.undefined(); + + private JsonNullable dueDate = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private JsonNullable reimbursableAmount = JsonNullable.undefined(); + + private JsonNullable memo = JsonNullable.undefined(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable location = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private JsonNullable accountingPeriod = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private JsonNullable reference = JsonNullable.undefined(); + + private JsonNullable subsidiary = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable approvedBy = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Id to be displayed. + */ + public Builder displayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public Builder displayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + + /** + * The expense report number. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * The expense report number. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * Title or purpose of the expense report. + */ + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = JsonNullable.of(title); + return this; + } + + /** + * Title or purpose of the expense report. + */ + public Builder title(JsonNullable title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + + /** + * The employee who submitted the expense report. + */ + public Builder employee(ExpenseReportUpdateInputEmployee employee) { + Utils.checkNotNull(employee, "employee"); + this.employee = Optional.ofNullable(employee); + return this; + } + + /** + * The employee who submitted the expense report. + */ + public Builder employee(Optional employee) { + Utils.checkNotNull(employee, "employee"); + this.employee = employee; + return this; + } + + + /** + * The status of the expense report. + */ + public Builder status(ExpenseReportUpdateInputStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * The status of the expense report. + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * The date the expense report was posted to the general ledger. + */ + public Builder postingDate(LocalDate postingDate) { + Utils.checkNotNull(postingDate, "postingDate"); + this.postingDate = JsonNullable.of(postingDate); + return this; + } + + /** + * The date the expense report was posted to the general ledger. + */ + public Builder postingDate(JsonNullable postingDate) { + Utils.checkNotNull(postingDate, "postingDate"); + this.postingDate = postingDate; + return this; + } + + + /** + * Date when reimbursement is due. + */ + public Builder dueDate(LocalDate dueDate) { + Utils.checkNotNull(dueDate, "dueDate"); + this.dueDate = JsonNullable.of(dueDate); + return this; + } + + /** + * Date when reimbursement is due. + */ + public Builder dueDate(JsonNullable dueDate) { + Utils.checkNotNull(dueDate, "dueDate"); + this.dueDate = dueDate; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * Total amount of all expense lines including tax. + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * Total amount of all expense lines including tax. + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + */ + public Builder reimbursableAmount(double reimbursableAmount) { + Utils.checkNotNull(reimbursableAmount, "reimbursableAmount"); + this.reimbursableAmount = JsonNullable.of(reimbursableAmount); + return this; + } + + /** + * Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + */ + public Builder reimbursableAmount(JsonNullable reimbursableAmount) { + Utils.checkNotNull(reimbursableAmount, "reimbursableAmount"); + this.reimbursableAmount = reimbursableAmount; + return this; + } + + + /** + * The memo of the expense report. + */ + public Builder memo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense report. + */ + public Builder memo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + + public Builder department(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + public Builder location(LinkedLocationInput location) { + Utils.checkNotNull(location, "location"); + this.location = JsonNullable.of(location); + return this; + } + + public Builder location(JsonNullable location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * The accounting period the expense report is posted to. + */ + public Builder accountingPeriod(ExpenseReportUpdateInputAccountingPeriod accountingPeriod) { + Utils.checkNotNull(accountingPeriod, "accountingPeriod"); + this.accountingPeriod = JsonNullable.of(accountingPeriod); + return this; + } + + /** + * The accounting period the expense report is posted to. + */ + public Builder accountingPeriod(JsonNullable accountingPeriod) { + Utils.checkNotNull(accountingPeriod, "accountingPeriod"); + this.accountingPeriod = accountingPeriod; + return this; + } + + + /** + * Expense line items linked to this expense report. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + /** + * Expense line items linked to this expense report. + */ + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + public Builder subsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public Builder subsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * The person who approved the expense report. + */ + public Builder approvedBy(ExpenseReportUpdateInputApprovedBy approvedBy) { + Utils.checkNotNull(approvedBy, "approvedBy"); + this.approvedBy = JsonNullable.of(approvedBy); + return this; + } + + /** + * The person who approved the expense report. + */ + public Builder approvedBy(JsonNullable approvedBy) { + Utils.checkNotNull(approvedBy, "approvedBy"); + this.approvedBy = approvedBy; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public ExpenseReportUpdateInput build() { + + return new ExpenseReportUpdateInput( + displayId, number, title, + employee, status, transactionDate, + postingDate, dueDate, currency, + currencyRate, subTotal, totalTax, + totalAmount, reimbursableAmount, memo, + department, location, account, + accountingPeriod, lineItems, reference, + subsidiary, trackingCategories, taxInclusive, + approvedBy, customFields, rowVersion, + passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputAccountingPeriod.java b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputAccountingPeriod.java new file mode 100644 index 000000000..cc9e79cdb --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputAccountingPeriod.java @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ExpenseReportUpdateInputAccountingPeriod + * + *

The accounting period the expense report is posted to. + */ +public class ExpenseReportUpdateInputAccountingPeriod { + /** + * A unique identifier for the accounting period. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The name of the accounting period. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private JsonNullable name; + + @JsonCreator + public ExpenseReportUpdateInputAccountingPeriod( + @JsonProperty("id") Optional id, + @JsonProperty("name") JsonNullable name) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + this.id = id; + this.name = name; + } + + public ExpenseReportUpdateInputAccountingPeriod() { + this(Optional.empty(), JsonNullable.undefined()); + } + + /** + * A unique identifier for the accounting period. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The name of the accounting period. + */ + @JsonIgnore + public JsonNullable name() { + return name; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for the accounting period. + */ + public ExpenseReportUpdateInputAccountingPeriod withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * A unique identifier for the accounting period. + */ + public ExpenseReportUpdateInputAccountingPeriod withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The name of the accounting period. + */ + public ExpenseReportUpdateInputAccountingPeriod withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = JsonNullable.of(name); + return this; + } + + /** + * The name of the accounting period. + */ + public ExpenseReportUpdateInputAccountingPeriod withName(JsonNullable name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExpenseReportUpdateInputAccountingPeriod other = (ExpenseReportUpdateInputAccountingPeriod) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name); + } + + @Override + public String toString() { + return Utils.toString(ExpenseReportUpdateInputAccountingPeriod.class, + "id", id, + "name", name); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private JsonNullable name = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for the accounting period. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * A unique identifier for the accounting period. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The name of the accounting period. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = JsonNullable.of(name); + return this; + } + + /** + * The name of the accounting period. + */ + public Builder name(JsonNullable name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public ExpenseReportUpdateInputAccountingPeriod build() { + + return new ExpenseReportUpdateInputAccountingPeriod( + id, name); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputApprovedBy.java b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputApprovedBy.java new file mode 100644 index 000000000..3747522df --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputApprovedBy.java @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ExpenseReportUpdateInputApprovedBy + * + *

The person who approved the expense report. + */ +public class ExpenseReportUpdateInputApprovedBy { + /** + * A unique identifier for the approver. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The display name of the approver. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_name") + private JsonNullable displayName; + + @JsonCreator + public ExpenseReportUpdateInputApprovedBy( + @JsonProperty("id") Optional id, + @JsonProperty("display_name") JsonNullable displayName) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(displayName, "displayName"); + this.id = id; + this.displayName = displayName; + } + + public ExpenseReportUpdateInputApprovedBy() { + this(Optional.empty(), JsonNullable.undefined()); + } + + /** + * A unique identifier for the approver. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The display name of the approver. + */ + @JsonIgnore + public JsonNullable displayName() { + return displayName; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for the approver. + */ + public ExpenseReportUpdateInputApprovedBy withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * A unique identifier for the approver. + */ + public ExpenseReportUpdateInputApprovedBy withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The display name of the approver. + */ + public ExpenseReportUpdateInputApprovedBy withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = JsonNullable.of(displayName); + return this; + } + + /** + * The display name of the approver. + */ + public ExpenseReportUpdateInputApprovedBy withDisplayName(JsonNullable displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExpenseReportUpdateInputApprovedBy other = (ExpenseReportUpdateInputApprovedBy) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.displayName, other.displayName); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, displayName); + } + + @Override + public String toString() { + return Utils.toString(ExpenseReportUpdateInputApprovedBy.class, + "id", id, + "displayName", displayName); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private JsonNullable displayName = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for the approver. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * A unique identifier for the approver. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The display name of the approver. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = JsonNullable.of(displayName); + return this; + } + + /** + * The display name of the approver. + */ + public Builder displayName(JsonNullable displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + public ExpenseReportUpdateInputApprovedBy build() { + + return new ExpenseReportUpdateInputApprovedBy( + id, displayName); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputEmployee.java b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputEmployee.java new file mode 100644 index 000000000..c76ccde65 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputEmployee.java @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ExpenseReportUpdateInputEmployee + * + *

The employee who submitted the expense report. + */ +public class ExpenseReportUpdateInputEmployee { + /** + * A unique identifier for the employee. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * The display name of the employee. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_name") + private JsonNullable displayName; + + @JsonCreator + public ExpenseReportUpdateInputEmployee( + @JsonProperty("id") Optional id, + @JsonProperty("display_name") JsonNullable displayName) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(displayName, "displayName"); + this.id = id; + this.displayName = displayName; + } + + public ExpenseReportUpdateInputEmployee() { + this(Optional.empty(), JsonNullable.undefined()); + } + + /** + * A unique identifier for the employee. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * The display name of the employee. + */ + @JsonIgnore + public JsonNullable displayName() { + return displayName; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A unique identifier for the employee. + */ + public ExpenseReportUpdateInputEmployee withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * A unique identifier for the employee. + */ + public ExpenseReportUpdateInputEmployee withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The display name of the employee. + */ + public ExpenseReportUpdateInputEmployee withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = JsonNullable.of(displayName); + return this; + } + + /** + * The display name of the employee. + */ + public ExpenseReportUpdateInputEmployee withDisplayName(JsonNullable displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExpenseReportUpdateInputEmployee other = (ExpenseReportUpdateInputEmployee) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.displayName, other.displayName); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, displayName); + } + + @Override + public String toString() { + return Utils.toString(ExpenseReportUpdateInputEmployee.class, + "id", id, + "displayName", displayName); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private JsonNullable displayName = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * A unique identifier for the employee. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * A unique identifier for the employee. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * The display name of the employee. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = JsonNullable.of(displayName); + return this; + } + + /** + * The display name of the employee. + */ + public Builder displayName(JsonNullable displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + public ExpenseReportUpdateInputEmployee build() { + + return new ExpenseReportUpdateInputEmployee( + id, displayName); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputStatus.java b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputStatus.java new file mode 100644 index 000000000..d73bd8048 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseReportUpdateInputStatus.java @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ExpenseReportUpdateInputStatus + * + *

The status of the expense report. + */ +public class ExpenseReportUpdateInputStatus { + + public static final ExpenseReportUpdateInputStatus DRAFT = new ExpenseReportUpdateInputStatus("draft"); + public static final ExpenseReportUpdateInputStatus SUBMITTED = new ExpenseReportUpdateInputStatus("submitted"); + public static final ExpenseReportUpdateInputStatus APPROVED = new ExpenseReportUpdateInputStatus("approved"); + public static final ExpenseReportUpdateInputStatus REIMBURSED = new ExpenseReportUpdateInputStatus("reimbursed"); + public static final ExpenseReportUpdateInputStatus REJECTED = new ExpenseReportUpdateInputStatus("rejected"); + public static final ExpenseReportUpdateInputStatus REVERSED = new ExpenseReportUpdateInputStatus("reversed"); + public static final ExpenseReportUpdateInputStatus VOIDED = new ExpenseReportUpdateInputStatus("voided"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ExpenseReportUpdateInputStatus(String value) { + this.value = value; + } + + /** + * Returns a ExpenseReportUpdateInputStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ExpenseReportUpdateInputStatus + */ + @JsonCreator + public static ExpenseReportUpdateInputStatus of(String value) { + synchronized (ExpenseReportUpdateInputStatus.class) { + return values.computeIfAbsent(value, v -> new ExpenseReportUpdateInputStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ExpenseReportUpdateInputStatus other = (ExpenseReportUpdateInputStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ExpenseReportUpdateInputStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static ExpenseReportUpdateInputStatus[] values() { + synchronized (ExpenseReportUpdateInputStatus.class) { + return values.values().toArray(new ExpenseReportUpdateInputStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("draft", DRAFT); + map.put("submitted", SUBMITTED); + map.put("approved", APPROVED); + map.put("reimbursed", REIMBURSED); + map.put("rejected", REJECTED); + map.put("reversed", REVERSED); + map.put("voided", VOIDED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("draft", ExpenseReportUpdateInputStatusEnum.DRAFT); + map.put("submitted", ExpenseReportUpdateInputStatusEnum.SUBMITTED); + map.put("approved", ExpenseReportUpdateInputStatusEnum.APPROVED); + map.put("reimbursed", ExpenseReportUpdateInputStatusEnum.REIMBURSED); + map.put("rejected", ExpenseReportUpdateInputStatusEnum.REJECTED); + map.put("reversed", ExpenseReportUpdateInputStatusEnum.REVERSED); + map.put("voided", ExpenseReportUpdateInputStatusEnum.VOIDED); + return map; + } + + + public enum ExpenseReportUpdateInputStatusEnum { + + DRAFT("draft"), + SUBMITTED("submitted"), + APPROVED("approved"), + REIMBURSED("reimbursed"), + REJECTED("rejected"), + REVERSED("reversed"), + VOIDED("voided"),; + + private final String value; + + private ExpenseReportUpdateInputStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInput.java b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInput.java new file mode 100644 index 000000000..e539e975a --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInput.java @@ -0,0 +1,1844 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Deprecated; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ExpenseUpdateInput + * + *

The writable shape of Expense for a single-record update. Identical to the model with the read-only + * properties removed and no required properties, because PATCH is partial and the API already + * validates it that way. + */ +public class ExpenseUpdateInput { + /** + * Id to be displayed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_id") + private JsonNullable displayId; + + /** + * Number. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: Deprecated. Use account instead.. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account_id") + @Deprecated + private Optional accountId; + + /** + * A flexible account reference that can represent a ledger account (GL account), a bank account, or an + * employee payable account, depending on the connector's requirements. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: Deprecated. Use supplier instead.. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier_id") + @Deprecated + private Optional supplierId; + + /** + * The supplier this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier") + private JsonNullable supplier; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private JsonNullable location; + + /** + * The ID of the department + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department_id") + private JsonNullable departmentId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + /** + * The type of payment for the expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_type") + private JsonNullable paymentType; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * The type of expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private JsonNullable type; + + /** + * The memo of the expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("memo") + private JsonNullable memo; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_rate") + private Optional taxRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The total amount of the expense line item. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + /** + * Expense line items linked to this expense. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + /** + * Optional reference identifier for the transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_document_url") + private JsonNullable sourceDocumentUrl; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * Expense status + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public ExpenseUpdateInput( + @JsonProperty("display_id") JsonNullable displayId, + @JsonProperty("number") JsonNullable number, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("account_id") Optional accountId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("supplier_id") Optional supplierId, + @JsonProperty("supplier") JsonNullable supplier, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("location") JsonNullable location, + @JsonProperty("department_id") JsonNullable departmentId, + @JsonProperty("department") JsonNullable department, + @JsonProperty("payment_type") JsonNullable paymentType, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("type") JsonNullable type, + @JsonProperty("memo") JsonNullable memo, + @JsonProperty("tax_rate") Optional taxRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("source_document_url") JsonNullable sourceDocumentUrl, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("status") JsonNullable status, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(displayId, "displayId"); + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(accountId, "accountId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(supplierId, "supplierId"); + Utils.checkNotNull(supplier, "supplier"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(departmentId, "departmentId"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(paymentType, "paymentType"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(memo, "memo"); + Utils.checkNotNull(taxRate, "taxRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.displayId = displayId; + this.number = number; + this.transactionDate = transactionDate; + this.accountId = accountId; + this.account = account; + this.supplierId = supplierId; + this.supplier = supplier; + this.companyId = companyId; + this.location = location; + this.departmentId = departmentId; + this.department = department; + this.paymentType = paymentType; + this.currency = currency; + this.currencyRate = currencyRate; + this.type = type; + this.memo = memo; + this.taxRate = taxRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalTax = totalTax; + this.totalAmount = totalAmount; + this.trackingCategories = trackingCategories; + this.lineItems = lineItems; + this.reference = reference; + this.sourceDocumentUrl = sourceDocumentUrl; + this.customFields = customFields; + this.status = status; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public ExpenseUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * Id to be displayed. + */ + @JsonIgnore + public JsonNullable displayId() { + return displayId; + } + + /** + * Number. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: Deprecated. Use account instead.. + */ + @Deprecated + @JsonIgnore + public Optional accountId() { + return accountId; + } + + /** + * A flexible account reference that can represent a ledger account (GL account), a bank account, or an + * employee payable account, depending on the connector's requirements. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: Deprecated. Use supplier instead.. + */ + @Deprecated + @JsonIgnore + public Optional supplierId() { + return supplierId; + } + + /** + * The supplier this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable supplier() { + return (JsonNullable) supplier; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable location() { + return (JsonNullable) location; + } + + /** + * The ID of the department + */ + @JsonIgnore + public JsonNullable departmentId() { + return departmentId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + /** + * The type of payment for the expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable paymentType() { + return (JsonNullable) paymentType; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * The type of expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable type() { + return (JsonNullable) type; + } + + /** + * The memo of the expense. + */ + @JsonIgnore + public JsonNullable memo() { + return memo; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional taxRate() { + return (Optional) taxRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The total amount of the expense line item. + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + /** + * Expense line items linked to this expense. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + /** + * Optional reference identifier for the transaction. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + @JsonIgnore + public JsonNullable sourceDocumentUrl() { + return sourceDocumentUrl; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * Expense status + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Id to be displayed. + */ + public ExpenseUpdateInput withDisplayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public ExpenseUpdateInput withDisplayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + /** + * Number. + */ + public ExpenseUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number. + */ + public ExpenseUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public ExpenseUpdateInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public ExpenseUpdateInput withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: Deprecated. Use account instead.. + */ + @Deprecated + public ExpenseUpdateInput withAccountId(String accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = Optional.ofNullable(accountId); + return this; + } + + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: Deprecated. Use account instead.. + */ + @Deprecated + public ExpenseUpdateInput withAccountId(Optional accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = accountId; + return this; + } + + /** + * A flexible account reference that can represent a ledger account (GL account), a bank account, or an + * employee payable account, depending on the connector's requirements. + */ + public ExpenseUpdateInput withAccount(LinkedFinancialAccountInput account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + /** + * A flexible account reference that can represent a ledger account (GL account), a bank account, or an + * employee payable account, depending on the connector's requirements. + */ + public ExpenseUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: Deprecated. Use supplier instead.. + */ + @Deprecated + public ExpenseUpdateInput withSupplierId(String supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = Optional.ofNullable(supplierId); + return this; + } + + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: Deprecated. Use supplier instead.. + */ + @Deprecated + public ExpenseUpdateInput withSupplierId(Optional supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = supplierId; + return this; + } + + /** + * The supplier this entity is linked to. + */ + public ExpenseUpdateInput withSupplier(LinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public ExpenseUpdateInput withSupplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public ExpenseUpdateInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public ExpenseUpdateInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public ExpenseUpdateInput withLocation(LinkedLocationInput location) { + Utils.checkNotNull(location, "location"); + this.location = JsonNullable.of(location); + return this; + } + + public ExpenseUpdateInput withLocation(JsonNullable location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * The ID of the department + */ + public ExpenseUpdateInput withDepartmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public ExpenseUpdateInput withDepartmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + public ExpenseUpdateInput withDepartment(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public ExpenseUpdateInput withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + /** + * The type of payment for the expense. + */ + public ExpenseUpdateInput withPaymentType(ExpenseUpdateInputPaymentType paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = JsonNullable.of(paymentType); + return this; + } + + /** + * The type of payment for the expense. + */ + public ExpenseUpdateInput withPaymentType(JsonNullable paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = paymentType; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ExpenseUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ExpenseUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public ExpenseUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public ExpenseUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * The type of expense. + */ + public ExpenseUpdateInput withType(ExpenseUpdateInputExpenseType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of expense. + */ + public ExpenseUpdateInput withType(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * The memo of the expense. + */ + public ExpenseUpdateInput withMemo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense. + */ + public ExpenseUpdateInput withMemo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + public ExpenseUpdateInput withTaxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + + public ExpenseUpdateInput withTaxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + /** + * Amounts are including tax + */ + public ExpenseUpdateInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public ExpenseUpdateInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public ExpenseUpdateInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public ExpenseUpdateInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public ExpenseUpdateInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public ExpenseUpdateInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The total amount of the expense line item. + */ + public ExpenseUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the expense line item. + */ + public ExpenseUpdateInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * A list of linked tracking categories. + */ + public ExpenseUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public ExpenseUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + /** + * Expense line items linked to this expense. + */ + public ExpenseUpdateInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + /** + * Expense line items linked to this expense. + */ + public ExpenseUpdateInput withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public ExpenseUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public ExpenseUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public ExpenseUpdateInput withSourceDocumentUrl(String sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public ExpenseUpdateInput withSourceDocumentUrl(JsonNullable sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = sourceDocumentUrl; + return this; + } + + public ExpenseUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public ExpenseUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * Expense status + */ + public ExpenseUpdateInput withStatus(ExpenseUpdateInputStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Expense status + */ + public ExpenseUpdateInput withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ExpenseUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public ExpenseUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExpenseUpdateInput other = (ExpenseUpdateInput) o; + return + Utils.enhancedDeepEquals(this.displayId, other.displayId) && + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.accountId, other.accountId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.supplierId, other.supplierId) && + Utils.enhancedDeepEquals(this.supplier, other.supplier) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.departmentId, other.departmentId) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.paymentType, other.paymentType) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.memo, other.memo) && + Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.sourceDocumentUrl, other.sourceDocumentUrl) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + displayId, number, transactionDate, + accountId, account, supplierId, + supplier, companyId, location, + departmentId, department, paymentType, + currency, currencyRate, type, + memo, taxRate, taxInclusive, + subTotal, totalTax, totalAmount, + trackingCategories, lineItems, reference, + sourceDocumentUrl, customFields, status, + rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(ExpenseUpdateInput.class, + "displayId", displayId, + "number", number, + "transactionDate", transactionDate, + "accountId", accountId, + "account", account, + "supplierId", supplierId, + "supplier", supplier, + "companyId", companyId, + "location", location, + "departmentId", departmentId, + "department", department, + "paymentType", paymentType, + "currency", currency, + "currencyRate", currencyRate, + "type", type, + "memo", memo, + "taxRate", taxRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalTax", totalTax, + "totalAmount", totalAmount, + "trackingCategories", trackingCategories, + "lineItems", lineItems, + "reference", reference, + "sourceDocumentUrl", sourceDocumentUrl, + "customFields", customFields, + "status", status, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable displayId = JsonNullable.undefined(); + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + @Deprecated + private Optional accountId = Optional.empty(); + + private JsonNullable account = JsonNullable.undefined(); + + @Deprecated + private Optional supplierId = Optional.empty(); + + private JsonNullable supplier = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable location = JsonNullable.undefined(); + + private JsonNullable departmentId = JsonNullable.undefined(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable paymentType = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable type = JsonNullable.undefined(); + + private JsonNullable memo = JsonNullable.undefined(); + + private Optional taxRate = Optional.empty(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private JsonNullable reference = JsonNullable.undefined(); + + private JsonNullable sourceDocumentUrl = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Id to be displayed. + */ + public Builder displayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public Builder displayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + + /** + * Number. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: Deprecated. Use account instead.. + */ + @Deprecated + public Builder accountId(String accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = Optional.ofNullable(accountId); + return this; + } + + /** + * The unique identifier for the ledger account that this expense should be credited to. Deprecated, + * use account instead. + * + * @deprecated field: Deprecated. Use account instead.. + */ + @Deprecated + public Builder accountId(Optional accountId) { + Utils.checkNotNull(accountId, "accountId"); + this.accountId = accountId; + return this; + } + + + /** + * A flexible account reference that can represent a ledger account (GL account), a bank account, or an + * employee payable account, depending on the connector's requirements. + */ + public Builder account(LinkedFinancialAccountInput account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + /** + * A flexible account reference that can represent a ledger account (GL account), a bank account, or an + * employee payable account, depending on the connector's requirements. + */ + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: Deprecated. Use supplier instead.. + */ + @Deprecated + public Builder supplierId(String supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = Optional.ofNullable(supplierId); + return this; + } + + /** + * The ID of the supplier this entity is linked to. Deprecated, use supplier instead. + * + * @deprecated field: Deprecated. Use supplier instead.. + */ + @Deprecated + public Builder supplierId(Optional supplierId) { + Utils.checkNotNull(supplierId, "supplierId"); + this.supplierId = supplierId; + return this; + } + + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(LinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + */ + public Builder supplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + public Builder location(LinkedLocationInput location) { + Utils.checkNotNull(location, "location"); + this.location = JsonNullable.of(location); + return this; + } + + public Builder location(JsonNullable location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * The ID of the department + */ + public Builder departmentId(String departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = JsonNullable.of(departmentId); + return this; + } + + /** + * The ID of the department + */ + public Builder departmentId(JsonNullable departmentId) { + Utils.checkNotNull(departmentId, "departmentId"); + this.departmentId = departmentId; + return this; + } + + + public Builder department(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + /** + * The type of payment for the expense. + */ + public Builder paymentType(ExpenseUpdateInputPaymentType paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = JsonNullable.of(paymentType); + return this; + } + + /** + * The type of payment for the expense. + */ + public Builder paymentType(JsonNullable paymentType) { + Utils.checkNotNull(paymentType, "paymentType"); + this.paymentType = paymentType; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * The type of expense. + */ + public Builder type(ExpenseUpdateInputExpenseType type) { + Utils.checkNotNull(type, "type"); + this.type = JsonNullable.of(type); + return this; + } + + /** + * The type of expense. + */ + public Builder type(JsonNullable type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * The memo of the expense. + */ + public Builder memo(String memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = JsonNullable.of(memo); + return this; + } + + /** + * The memo of the expense. + */ + public Builder memo(JsonNullable memo) { + Utils.checkNotNull(memo, "memo"); + this.memo = memo; + return this; + } + + + public Builder taxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + public Builder taxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The total amount of the expense line item. + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the expense line item. + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + /** + * Expense line items linked to this expense. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + /** + * Expense line items linked to this expense. + */ + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference identifier for the transaction. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Builder sourceDocumentUrl(String sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = JsonNullable.of(sourceDocumentUrl); + return this; + } + + /** + * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only + * supported for Xero. + */ + public Builder sourceDocumentUrl(JsonNullable sourceDocumentUrl) { + Utils.checkNotNull(sourceDocumentUrl, "sourceDocumentUrl"); + this.sourceDocumentUrl = sourceDocumentUrl; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * Expense status + */ + public Builder status(ExpenseUpdateInputStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Expense status + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public ExpenseUpdateInput build() { + + return new ExpenseUpdateInput( + displayId, number, transactionDate, + accountId, account, supplierId, + supplier, companyId, location, + departmentId, department, paymentType, + currency, currencyRate, type, + memo, taxRate, taxInclusive, + subTotal, totalTax, totalAmount, + trackingCategories, lineItems, reference, + sourceDocumentUrl, customFields, status, + rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputExpenseType.java b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputExpenseType.java new file mode 100644 index 000000000..c1abbf209 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputExpenseType.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ExpenseUpdateInputExpenseType + * + *

The type of expense. + */ +public class ExpenseUpdateInputExpenseType { + + public static final ExpenseUpdateInputExpenseType EXPENSE = new ExpenseUpdateInputExpenseType("expense"); + public static final ExpenseUpdateInputExpenseType REFUND = new ExpenseUpdateInputExpenseType("refund"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ExpenseUpdateInputExpenseType(String value) { + this.value = value; + } + + /** + * Returns a ExpenseUpdateInputExpenseType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ExpenseUpdateInputExpenseType + */ + @JsonCreator + public static ExpenseUpdateInputExpenseType of(String value) { + synchronized (ExpenseUpdateInputExpenseType.class) { + return values.computeIfAbsent(value, v -> new ExpenseUpdateInputExpenseType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ExpenseUpdateInputExpenseType other = (ExpenseUpdateInputExpenseType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ExpenseUpdateInputExpenseType [value=" + value + "]"; + } + + // return an array just like an enum + public static ExpenseUpdateInputExpenseType[] values() { + synchronized (ExpenseUpdateInputExpenseType.class) { + return values.values().toArray(new ExpenseUpdateInputExpenseType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("expense", EXPENSE); + map.put("refund", REFUND); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("expense", ExpenseUpdateInputExpenseTypeEnum.EXPENSE); + map.put("refund", ExpenseUpdateInputExpenseTypeEnum.REFUND); + return map; + } + + + public enum ExpenseUpdateInputExpenseTypeEnum { + + EXPENSE("expense"), + REFUND("refund"),; + + private final String value; + + private ExpenseUpdateInputExpenseTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputPaymentType.java b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputPaymentType.java new file mode 100644 index 000000000..3867b0ad1 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputPaymentType.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ExpenseUpdateInputPaymentType + * + *

The type of payment for the expense. + */ +public class ExpenseUpdateInputPaymentType { + + public static final ExpenseUpdateInputPaymentType CASH = new ExpenseUpdateInputPaymentType("cash"); + public static final ExpenseUpdateInputPaymentType CHECK = new ExpenseUpdateInputPaymentType("check"); + public static final ExpenseUpdateInputPaymentType CREDIT_CARD = new ExpenseUpdateInputPaymentType("credit_card"); + public static final ExpenseUpdateInputPaymentType OTHER = new ExpenseUpdateInputPaymentType("other"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ExpenseUpdateInputPaymentType(String value) { + this.value = value; + } + + /** + * Returns a ExpenseUpdateInputPaymentType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ExpenseUpdateInputPaymentType + */ + @JsonCreator + public static ExpenseUpdateInputPaymentType of(String value) { + synchronized (ExpenseUpdateInputPaymentType.class) { + return values.computeIfAbsent(value, v -> new ExpenseUpdateInputPaymentType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ExpenseUpdateInputPaymentType other = (ExpenseUpdateInputPaymentType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ExpenseUpdateInputPaymentType [value=" + value + "]"; + } + + // return an array just like an enum + public static ExpenseUpdateInputPaymentType[] values() { + synchronized (ExpenseUpdateInputPaymentType.class) { + return values.values().toArray(new ExpenseUpdateInputPaymentType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("cash", CASH); + map.put("check", CHECK); + map.put("credit_card", CREDIT_CARD); + map.put("other", OTHER); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("cash", ExpenseUpdateInputPaymentTypeEnum.CASH); + map.put("check", ExpenseUpdateInputPaymentTypeEnum.CHECK); + map.put("credit_card", ExpenseUpdateInputPaymentTypeEnum.CREDIT_CARD); + map.put("other", ExpenseUpdateInputPaymentTypeEnum.OTHER); + return map; + } + + + public enum ExpenseUpdateInputPaymentTypeEnum { + + CASH("cash"), + CHECK("check"), + CREDIT_CARD("credit_card"), + OTHER("other"),; + + private final String value; + + private ExpenseUpdateInputPaymentTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputStatus.java b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputStatus.java new file mode 100644 index 000000000..a3ef5fee3 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ExpenseUpdateInputStatus.java @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ExpenseUpdateInputStatus + * + *

Expense status + */ +public class ExpenseUpdateInputStatus { + + public static final ExpenseUpdateInputStatus DRAFT = new ExpenseUpdateInputStatus("draft"); + public static final ExpenseUpdateInputStatus POSTED = new ExpenseUpdateInputStatus("posted"); + public static final ExpenseUpdateInputStatus VOIDED = new ExpenseUpdateInputStatus("voided"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ExpenseUpdateInputStatus(String value) { + this.value = value; + } + + /** + * Returns a ExpenseUpdateInputStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ExpenseUpdateInputStatus + */ + @JsonCreator + public static ExpenseUpdateInputStatus of(String value) { + synchronized (ExpenseUpdateInputStatus.class) { + return values.computeIfAbsent(value, v -> new ExpenseUpdateInputStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ExpenseUpdateInputStatus other = (ExpenseUpdateInputStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ExpenseUpdateInputStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static ExpenseUpdateInputStatus[] values() { + synchronized (ExpenseUpdateInputStatus.class) { + return values.values().toArray(new ExpenseUpdateInputStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("draft", DRAFT); + map.put("posted", POSTED); + map.put("voided", VOIDED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("draft", ExpenseUpdateInputStatusEnum.DRAFT); + map.put("posted", ExpenseUpdateInputStatusEnum.POSTED); + map.put("voided", ExpenseUpdateInputStatusEnum.VOIDED); + return map; + } + + + public enum ExpenseUpdateInputStatusEnum { + + DRAFT("draft"), + POSTED("posted"), + VOIDED("voided"),; + + private final String value; + + private ExpenseUpdateInputStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/PaymentUpdateInput.java b/src/main/java/com/apideck/unify/models/components/PaymentUpdateInput.java new file mode 100644 index 000000000..57d807c97 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/PaymentUpdateInput.java @@ -0,0 +1,1662 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Deprecated; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * PaymentUpdateInput + * + *

The writable shape of Payment for a single-record update. Identical to the model with the read-only + * properties removed and no required properties, because PATCH is partial and the API already + * validates it that way. + */ +public class PaymentUpdateInput { + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * The total amount of the transaction or record + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method") + private JsonNullable paymentMethod; + + /** + * Optional reference message returned by payment method on processing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_reference") + private JsonNullable paymentMethodReference; + + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_id") + private JsonNullable paymentMethodId; + + /** + * Type of accounts receivable account. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accounts_receivable_account_type") + @Deprecated + private JsonNullable accountsReceivableAccountType; + + /** + * Unique identifier for the account to allocate payment to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("accounts_receivable_account_id") + @Deprecated + private JsonNullable accountsReceivableAccountId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * The supplier this entity is linked to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("supplier") + @Deprecated + private JsonNullable supplier; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subsidiary") + private JsonNullable subsidiary; + + /** + * Indicates if the transaction has been reconciled. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reconciled") + private JsonNullable reconciled; + + /** + * Status of payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * Type of payment + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allocations") + private Optional> allocations; + + /** + * Note associated with the transaction + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Number associated with the transaction + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * Id to be displayed. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_id") + private JsonNullable displayId; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public PaymentUpdateInput( + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("payment_method") JsonNullable paymentMethod, + @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, + @JsonProperty("payment_method_id") JsonNullable paymentMethodId, + @JsonProperty("accounts_receivable_account_type") JsonNullable accountsReceivableAccountType, + @JsonProperty("accounts_receivable_account_id") JsonNullable accountsReceivableAccountId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("supplier") JsonNullable supplier, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("subsidiary") JsonNullable subsidiary, + @JsonProperty("reconciled") JsonNullable reconciled, + @JsonProperty("status") Optional status, + @JsonProperty("type") Optional type, + @JsonProperty("allocations") Optional> allocations, + @JsonProperty("note") JsonNullable note, + @JsonProperty("number") JsonNullable number, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("display_id") JsonNullable displayId, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(accountsReceivableAccountType, "accountsReceivableAccountType"); + Utils.checkNotNull(accountsReceivableAccountId, "accountsReceivableAccountId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(supplier, "supplier"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(subsidiary, "subsidiary"); + Utils.checkNotNull(reconciled, "reconciled"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(allocations, "allocations"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(displayId, "displayId"); + Utils.checkNotNull(passThrough, "passThrough"); + this.currency = currency; + this.currencyRate = currencyRate; + this.totalAmount = totalAmount; + this.reference = reference; + this.paymentMethod = paymentMethod; + this.paymentMethodReference = paymentMethodReference; + this.paymentMethodId = paymentMethodId; + this.accountsReceivableAccountType = accountsReceivableAccountType; + this.accountsReceivableAccountId = accountsReceivableAccountId; + this.account = account; + this.transactionDate = transactionDate; + this.customer = customer; + this.supplier = supplier; + this.companyId = companyId; + this.subsidiary = subsidiary; + this.reconciled = reconciled; + this.status = status; + this.type = type; + this.allocations = allocations; + this.note = note; + this.number = number; + this.trackingCategories = trackingCategories; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.displayId = displayId; + this.passThrough = passThrough; + } + + public PaymentUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * The total amount of the transaction or record + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonIgnore + public JsonNullable paymentMethod() { + return paymentMethod; + } + + /** + * Optional reference message returned by payment method on processing + */ + @JsonIgnore + public JsonNullable paymentMethodReference() { + return paymentMethodReference; + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable paymentMethodId() { + return paymentMethodId; + } + + /** + * Type of accounts receivable account. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + @JsonIgnore + public JsonNullable accountsReceivableAccountType() { + return accountsReceivableAccountType; + } + + /** + * Unique identifier for the account to allocate payment to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + @JsonIgnore + public JsonNullable accountsReceivableAccountId() { + return accountsReceivableAccountId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * The supplier this entity is linked to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable supplier() { + return (JsonNullable) supplier; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable subsidiary() { + return (JsonNullable) subsidiary; + } + + /** + * Indicates if the transaction has been reconciled. + */ + @JsonIgnore + public JsonNullable reconciled() { + return reconciled; + } + + /** + * Status of payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * Type of payment + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> allocations() { + return (Optional>) allocations; + } + + /** + * Note associated with the transaction + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Number associated with the transaction + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * Id to be displayed. + */ + @JsonIgnore + public JsonNullable displayId() { + return displayId; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public PaymentUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public PaymentUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public PaymentUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public PaymentUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * The total amount of the transaction or record + */ + public PaymentUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public PaymentUpdateInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public PaymentUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public PaymentUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public PaymentUpdateInput withPaymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public PaymentUpdateInput withPaymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public PaymentUpdateInput withPaymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public PaymentUpdateInput withPaymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + /** + * A unique identifier for an object. + */ + public PaymentUpdateInput withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public PaymentUpdateInput withPaymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + /** + * Type of accounts receivable account. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public PaymentUpdateInput withAccountsReceivableAccountType(String accountsReceivableAccountType) { + Utils.checkNotNull(accountsReceivableAccountType, "accountsReceivableAccountType"); + this.accountsReceivableAccountType = JsonNullable.of(accountsReceivableAccountType); + return this; + } + + /** + * Type of accounts receivable account. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public PaymentUpdateInput withAccountsReceivableAccountType(JsonNullable accountsReceivableAccountType) { + Utils.checkNotNull(accountsReceivableAccountType, "accountsReceivableAccountType"); + this.accountsReceivableAccountType = accountsReceivableAccountType; + return this; + } + + /** + * Unique identifier for the account to allocate payment to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public PaymentUpdateInput withAccountsReceivableAccountId(String accountsReceivableAccountId) { + Utils.checkNotNull(accountsReceivableAccountId, "accountsReceivableAccountId"); + this.accountsReceivableAccountId = JsonNullable.of(accountsReceivableAccountId); + return this; + } + + /** + * Unique identifier for the account to allocate payment to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public PaymentUpdateInput withAccountsReceivableAccountId(JsonNullable accountsReceivableAccountId) { + Utils.checkNotNull(accountsReceivableAccountId, "accountsReceivableAccountId"); + this.accountsReceivableAccountId = accountsReceivableAccountId; + return this; + } + + public PaymentUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public PaymentUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public PaymentUpdateInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public PaymentUpdateInput withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * The customer this entity is linked to. + */ + public PaymentUpdateInput withCustomer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public PaymentUpdateInput withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * The supplier this entity is linked to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public PaymentUpdateInput withSupplier(DeprecatedLinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public PaymentUpdateInput withSupplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public PaymentUpdateInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public PaymentUpdateInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + public PaymentUpdateInput withSubsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public PaymentUpdateInput withSubsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + /** + * Indicates if the transaction has been reconciled. + */ + public PaymentUpdateInput withReconciled(boolean reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = JsonNullable.of(reconciled); + return this; + } + + /** + * Indicates if the transaction has been reconciled. + */ + public PaymentUpdateInput withReconciled(JsonNullable reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = reconciled; + return this; + } + + /** + * Status of payment + */ + public PaymentUpdateInput withStatus(PaymentStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * Status of payment + */ + public PaymentUpdateInput withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Type of payment + */ + public PaymentUpdateInput withType(PaymentType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * Type of payment + */ + public PaymentUpdateInput withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public PaymentUpdateInput withAllocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + + public PaymentUpdateInput withAllocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + /** + * Note associated with the transaction + */ + public PaymentUpdateInput withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Note associated with the transaction + */ + public PaymentUpdateInput withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Number associated with the transaction + */ + public PaymentUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number associated with the transaction + */ + public PaymentUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * A list of linked tracking categories. + */ + public PaymentUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public PaymentUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + public PaymentUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public PaymentUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public PaymentUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public PaymentUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * Id to be displayed. + */ + public PaymentUpdateInput withDisplayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public PaymentUpdateInput withDisplayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public PaymentUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public PaymentUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentUpdateInput other = (PaymentUpdateInput) o; + return + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod) && + Utils.enhancedDeepEquals(this.paymentMethodReference, other.paymentMethodReference) && + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.accountsReceivableAccountType, other.accountsReceivableAccountType) && + Utils.enhancedDeepEquals(this.accountsReceivableAccountId, other.accountsReceivableAccountId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.supplier, other.supplier) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.subsidiary, other.subsidiary) && + Utils.enhancedDeepEquals(this.reconciled, other.reconciled) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.allocations, other.allocations) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.displayId, other.displayId) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + currency, currencyRate, totalAmount, + reference, paymentMethod, paymentMethodReference, + paymentMethodId, accountsReceivableAccountType, accountsReceivableAccountId, + account, transactionDate, customer, + supplier, companyId, subsidiary, + reconciled, status, type, + allocations, note, number, + trackingCategories, customFields, rowVersion, + displayId, passThrough); + } + + @Override + public String toString() { + return Utils.toString(PaymentUpdateInput.class, + "currency", currency, + "currencyRate", currencyRate, + "totalAmount", totalAmount, + "reference", reference, + "paymentMethod", paymentMethod, + "paymentMethodReference", paymentMethodReference, + "paymentMethodId", paymentMethodId, + "accountsReceivableAccountType", accountsReceivableAccountType, + "accountsReceivableAccountId", accountsReceivableAccountId, + "account", account, + "transactionDate", transactionDate, + "customer", customer, + "supplier", supplier, + "companyId", companyId, + "subsidiary", subsidiary, + "reconciled", reconciled, + "status", status, + "type", type, + "allocations", allocations, + "note", note, + "number", number, + "trackingCategories", trackingCategories, + "customFields", customFields, + "rowVersion", rowVersion, + "displayId", displayId, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private JsonNullable reference = JsonNullable.undefined(); + + private JsonNullable paymentMethod = JsonNullable.undefined(); + + private JsonNullable paymentMethodReference = JsonNullable.undefined(); + + private JsonNullable paymentMethodId = JsonNullable.undefined(); + + @Deprecated + private JsonNullable accountsReceivableAccountType = JsonNullable.undefined(); + + @Deprecated + private JsonNullable accountsReceivableAccountId = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + @Deprecated + private JsonNullable supplier = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable subsidiary = JsonNullable.undefined(); + + private JsonNullable reconciled = JsonNullable.undefined(); + + private Optional status = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional> allocations = Optional.empty(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private JsonNullable displayId = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional transaction reference message ie: Debit remittance detail. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + /** + * Type of accounts receivable account. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public Builder accountsReceivableAccountType(String accountsReceivableAccountType) { + Utils.checkNotNull(accountsReceivableAccountType, "accountsReceivableAccountType"); + this.accountsReceivableAccountType = JsonNullable.of(accountsReceivableAccountType); + return this; + } + + /** + * Type of accounts receivable account. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public Builder accountsReceivableAccountType(JsonNullable accountsReceivableAccountType) { + Utils.checkNotNull(accountsReceivableAccountType, "accountsReceivableAccountType"); + this.accountsReceivableAccountType = accountsReceivableAccountType; + return this; + } + + + /** + * Unique identifier for the account to allocate payment to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public Builder accountsReceivableAccountId(String accountsReceivableAccountId) { + Utils.checkNotNull(accountsReceivableAccountId, "accountsReceivableAccountId"); + this.accountsReceivableAccountId = JsonNullable.of(accountsReceivableAccountId); + return this; + } + + /** + * Unique identifier for the account to allocate payment to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public Builder accountsReceivableAccountId(JsonNullable accountsReceivableAccountId) { + Utils.checkNotNull(accountsReceivableAccountId, "accountsReceivableAccountId"); + this.accountsReceivableAccountId = accountsReceivableAccountId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * The supplier this entity is linked to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public Builder supplier(DeprecatedLinkedSupplierInput supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = JsonNullable.of(supplier); + return this; + } + + /** + * The supplier this entity is linked to. + * + * @deprecated field: This field is deprecated and may be removed in a future version.. + */ + @Deprecated + public Builder supplier(JsonNullable supplier) { + Utils.checkNotNull(supplier, "supplier"); + this.supplier = supplier; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + public Builder subsidiary(LinkedSubsidiaryInput subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = JsonNullable.of(subsidiary); + return this; + } + + public Builder subsidiary(JsonNullable subsidiary) { + Utils.checkNotNull(subsidiary, "subsidiary"); + this.subsidiary = subsidiary; + return this; + } + + + /** + * Indicates if the transaction has been reconciled. + */ + public Builder reconciled(boolean reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = JsonNullable.of(reconciled); + return this; + } + + /** + * Indicates if the transaction has been reconciled. + */ + public Builder reconciled(JsonNullable reconciled) { + Utils.checkNotNull(reconciled, "reconciled"); + this.reconciled = reconciled; + return this; + } + + + /** + * Status of payment + */ + public Builder status(PaymentStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Status of payment + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Type of payment + */ + public Builder type(PaymentType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * Type of payment + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + public Builder allocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + public Builder allocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + + /** + * Note associated with the transaction + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Note associated with the transaction + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Number associated with the transaction + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Number associated with the transaction + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * Id to be displayed. + */ + public Builder displayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * Id to be displayed. + */ + public Builder displayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public PaymentUpdateInput build() { + + return new PaymentUpdateInput( + currency, currencyRate, totalAmount, + reference, paymentMethod, paymentMethodReference, + paymentMethodId, accountsReceivableAccountType, accountsReceivableAccountId, + account, transactionDate, customer, + supplier, companyId, subsidiary, + reconciled, status, type, + allocations, note, number, + trackingCategories, customFields, rowVersion, + displayId, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInput.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInput.java new file mode 100644 index 000000000..01c06e841 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInput.java @@ -0,0 +1,2247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.LazySingletonValue; +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.LocalDate; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ProjectUpdateInput + * + *

The writable shape of Project for a single-record update. Identical to the model with the read-only + * properties removed and no required properties, because PATCH is partial and the API already + * validates it that way. + */ +public class ProjectUpdateInput { + /** + * Name of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * User-friendly project identifier + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_id") + private JsonNullable displayId; + + /** + * External reference identifier for the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference_id") + private JsonNullable referenceId; + + /** + * Detailed description of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("description") + private JsonNullable description; + + /** + * Current status of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private JsonNullable status; + + /** + * Indicates whether the project is currently active or inactive + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("active") + private JsonNullable active; + + /** + * Type or category of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("project_type") + private JsonNullable projectType; + + /** + * Priority level of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("priority") + private JsonNullable priority; + + /** + * Percentage of project completion (0-100) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("completion_percentage") + private JsonNullable completionPercentage; + + /** + * Start date of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("start_date") + private JsonNullable startDate; + + /** + * Expected or planned end date of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("end_date") + private JsonNullable endDate; + + /** + * Actual end date of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("completion_date") + private JsonNullable completionDate; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * Department or organizational unit associated with the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + /** + * ID of the user who owns/manages this project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("owner_id") + private JsonNullable ownerId; + + /** + * Parent project if this is a subproject + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("parent_project") + private JsonNullable parentProject; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Total budgeted amount for the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("budget_amount") + private JsonNullable budgetAmount; + + /** + * Approved budget amount for the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("approved_amount") + private JsonNullable approvedAmount; + + /** + * Total budgeted hours for the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("budget_hours") + private JsonNullable budgetHours; + + /** + * Default hourly rate for project work + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hourly_rate") + private JsonNullable hourlyRate; + + /** + * Method used for billing this project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("billing_method") + private JsonNullable billingMethod; + + /** + * Indicates if the project is billable to the customer + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("is_billable") + private JsonNullable isBillable; + + /** + * Current phase of the project lifecycle + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("phase") + private JsonNullable phase; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_rate") + private Optional taxRate; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + /** + * Tags associated with the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private Optional> tags; + + /** + * Additional notes about the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("notes") + private JsonNullable notes; + + /** + * Contract or agreement number associated with the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contract_number") + private JsonNullable contractNumber; + + /** + * Expected profit margin percentage for the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("profit_margin") + private JsonNullable profitMargin; + + /** + * Current status of project schedule compared to plan + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("schedule_status") + private JsonNullable scheduleStatus; + + /** + * An array of addresses associated with the project (billing, job site, etc.) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("addresses") + private Optional> addresses; + + /** + * Number of team members assigned to the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("team_size") + private JsonNullable teamSize; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + @JsonCreator + public ProjectUpdateInput( + @JsonProperty("name") Optional name, + @JsonProperty("display_id") JsonNullable displayId, + @JsonProperty("reference_id") JsonNullable referenceId, + @JsonProperty("description") JsonNullable description, + @JsonProperty("status") JsonNullable status, + @JsonProperty("active") JsonNullable active, + @JsonProperty("project_type") JsonNullable projectType, + @JsonProperty("priority") JsonNullable priority, + @JsonProperty("completion_percentage") JsonNullable completionPercentage, + @JsonProperty("start_date") JsonNullable startDate, + @JsonProperty("end_date") JsonNullable endDate, + @JsonProperty("completion_date") JsonNullable completionDate, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("department") JsonNullable department, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("owner_id") JsonNullable ownerId, + @JsonProperty("parent_project") JsonNullable parentProject, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("budget_amount") JsonNullable budgetAmount, + @JsonProperty("approved_amount") JsonNullable approvedAmount, + @JsonProperty("budget_hours") JsonNullable budgetHours, + @JsonProperty("hourly_rate") JsonNullable hourlyRate, + @JsonProperty("billing_method") JsonNullable billingMethod, + @JsonProperty("is_billable") JsonNullable isBillable, + @JsonProperty("phase") JsonNullable phase, + @JsonProperty("tax_rate") Optional taxRate, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("tags") Optional> tags, + @JsonProperty("notes") JsonNullable notes, + @JsonProperty("contract_number") JsonNullable contractNumber, + @JsonProperty("profit_margin") JsonNullable profitMargin, + @JsonProperty("schedule_status") JsonNullable scheduleStatus, + @JsonProperty("addresses") Optional> addresses, + @JsonProperty("team_size") JsonNullable teamSize, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(displayId, "displayId"); + Utils.checkNotNull(referenceId, "referenceId"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(active, "active"); + Utils.checkNotNull(projectType, "projectType"); + Utils.checkNotNull(priority, "priority"); + Utils.checkNotNull(completionPercentage, "completionPercentage"); + Utils.checkNotNull(startDate, "startDate"); + Utils.checkNotNull(endDate, "endDate"); + Utils.checkNotNull(completionDate, "completionDate"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(ownerId, "ownerId"); + Utils.checkNotNull(parentProject, "parentProject"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(budgetAmount, "budgetAmount"); + Utils.checkNotNull(approvedAmount, "approvedAmount"); + Utils.checkNotNull(budgetHours, "budgetHours"); + Utils.checkNotNull(hourlyRate, "hourlyRate"); + Utils.checkNotNull(billingMethod, "billingMethod"); + Utils.checkNotNull(isBillable, "isBillable"); + Utils.checkNotNull(phase, "phase"); + Utils.checkNotNull(taxRate, "taxRate"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(tags, "tags"); + Utils.checkNotNull(notes, "notes"); + Utils.checkNotNull(contractNumber, "contractNumber"); + Utils.checkNotNull(profitMargin, "profitMargin"); + Utils.checkNotNull(scheduleStatus, "scheduleStatus"); + Utils.checkNotNull(addresses, "addresses"); + Utils.checkNotNull(teamSize, "teamSize"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + this.name = name; + this.displayId = displayId; + this.referenceId = referenceId; + this.description = description; + this.status = status; + this.active = active; + this.projectType = projectType; + this.priority = priority; + this.completionPercentage = completionPercentage; + this.startDate = startDate; + this.endDate = endDate; + this.completionDate = completionDate; + this.customer = customer; + this.department = department; + this.companyId = companyId; + this.ownerId = ownerId; + this.parentProject = parentProject; + this.currency = currency; + this.budgetAmount = budgetAmount; + this.approvedAmount = approvedAmount; + this.budgetHours = budgetHours; + this.hourlyRate = hourlyRate; + this.billingMethod = billingMethod; + this.isBillable = isBillable; + this.phase = phase; + this.taxRate = taxRate; + this.trackingCategories = trackingCategories; + this.tags = tags; + this.notes = notes; + this.contractNumber = contractNumber; + this.profitMargin = profitMargin; + this.scheduleStatus = scheduleStatus; + this.addresses = addresses; + this.teamSize = teamSize; + this.customFields = customFields; + this.rowVersion = rowVersion; + } + + public ProjectUpdateInput() { + this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); + } + + /** + * Name of the project + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * User-friendly project identifier + */ + @JsonIgnore + public JsonNullable displayId() { + return displayId; + } + + /** + * External reference identifier for the project + */ + @JsonIgnore + public JsonNullable referenceId() { + return referenceId; + } + + /** + * Detailed description of the project + */ + @JsonIgnore + public JsonNullable description() { + return description; + } + + /** + * Current status of the project + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable status() { + return (JsonNullable) status; + } + + /** + * Indicates whether the project is currently active or inactive + */ + @JsonIgnore + public JsonNullable active() { + return active; + } + + /** + * Type or category of the project + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable projectType() { + return (JsonNullable) projectType; + } + + /** + * Priority level of the project + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable priority() { + return (JsonNullable) priority; + } + + /** + * Percentage of project completion (0-100) + */ + @JsonIgnore + public JsonNullable completionPercentage() { + return completionPercentage; + } + + /** + * Start date of the project + */ + @JsonIgnore + public JsonNullable startDate() { + return startDate; + } + + /** + * Expected or planned end date of the project + */ + @JsonIgnore + public JsonNullable endDate() { + return endDate; + } + + /** + * Actual end date of the project + */ + @JsonIgnore + public JsonNullable completionDate() { + return completionDate; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * Department or organizational unit associated with the project + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + /** + * ID of the user who owns/manages this project + */ + @JsonIgnore + public JsonNullable ownerId() { + return ownerId; + } + + /** + * Parent project if this is a subproject + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable parentProject() { + return (JsonNullable) parentProject; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Total budgeted amount for the project + */ + @JsonIgnore + public JsonNullable budgetAmount() { + return budgetAmount; + } + + /** + * Approved budget amount for the project + */ + @JsonIgnore + public JsonNullable approvedAmount() { + return approvedAmount; + } + + /** + * Total budgeted hours for the project + */ + @JsonIgnore + public JsonNullable budgetHours() { + return budgetHours; + } + + /** + * Default hourly rate for project work + */ + @JsonIgnore + public JsonNullable hourlyRate() { + return hourlyRate; + } + + /** + * Method used for billing this project + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable billingMethod() { + return (JsonNullable) billingMethod; + } + + /** + * Indicates if the project is billable to the customer + */ + @JsonIgnore + public JsonNullable isBillable() { + return isBillable; + } + + /** + * Current phase of the project lifecycle + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable phase() { + return (JsonNullable) phase; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional taxRate() { + return (Optional) taxRate; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + /** + * Tags associated with the project + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> tags() { + return (Optional>) tags; + } + + /** + * Additional notes about the project + */ + @JsonIgnore + public JsonNullable notes() { + return notes; + } + + /** + * Contract or agreement number associated with the project + */ + @JsonIgnore + public JsonNullable contractNumber() { + return contractNumber; + } + + /** + * Expected profit margin percentage for the project + */ + @JsonIgnore + public JsonNullable profitMargin() { + return profitMargin; + } + + /** + * Current status of project schedule compared to plan + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable scheduleStatus() { + return (JsonNullable) scheduleStatus; + } + + /** + * An array of addresses associated with the project (billing, job site, etc.) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> addresses() { + return (Optional>) addresses; + } + + /** + * Number of team members assigned to the project + */ + @JsonIgnore + public JsonNullable teamSize() { + return teamSize; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Name of the project + */ + public ProjectUpdateInput withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * Name of the project + */ + public ProjectUpdateInput withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * User-friendly project identifier + */ + public ProjectUpdateInput withDisplayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * User-friendly project identifier + */ + public ProjectUpdateInput withDisplayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + /** + * External reference identifier for the project + */ + public ProjectUpdateInput withReferenceId(String referenceId) { + Utils.checkNotNull(referenceId, "referenceId"); + this.referenceId = JsonNullable.of(referenceId); + return this; + } + + /** + * External reference identifier for the project + */ + public ProjectUpdateInput withReferenceId(JsonNullable referenceId) { + Utils.checkNotNull(referenceId, "referenceId"); + this.referenceId = referenceId; + return this; + } + + /** + * Detailed description of the project + */ + public ProjectUpdateInput withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = JsonNullable.of(description); + return this; + } + + /** + * Detailed description of the project + */ + public ProjectUpdateInput withDescription(JsonNullable description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * Current status of the project + */ + public ProjectUpdateInput withStatus(ProjectUpdateInputProjectStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Current status of the project + */ + public ProjectUpdateInput withStatus(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Indicates whether the project is currently active or inactive + */ + public ProjectUpdateInput withActive(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = JsonNullable.of(active); + return this; + } + + /** + * Indicates whether the project is currently active or inactive + */ + public ProjectUpdateInput withActive(JsonNullable active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + /** + * Type or category of the project + */ + public ProjectUpdateInput withProjectType(ProjectUpdateInputProjectType projectType) { + Utils.checkNotNull(projectType, "projectType"); + this.projectType = JsonNullable.of(projectType); + return this; + } + + /** + * Type or category of the project + */ + public ProjectUpdateInput withProjectType(JsonNullable projectType) { + Utils.checkNotNull(projectType, "projectType"); + this.projectType = projectType; + return this; + } + + /** + * Priority level of the project + */ + public ProjectUpdateInput withPriority(ProjectUpdateInputPriority priority) { + Utils.checkNotNull(priority, "priority"); + this.priority = JsonNullable.of(priority); + return this; + } + + /** + * Priority level of the project + */ + public ProjectUpdateInput withPriority(JsonNullable priority) { + Utils.checkNotNull(priority, "priority"); + this.priority = priority; + return this; + } + + /** + * Percentage of project completion (0-100) + */ + public ProjectUpdateInput withCompletionPercentage(double completionPercentage) { + Utils.checkNotNull(completionPercentage, "completionPercentage"); + this.completionPercentage = JsonNullable.of(completionPercentage); + return this; + } + + /** + * Percentage of project completion (0-100) + */ + public ProjectUpdateInput withCompletionPercentage(JsonNullable completionPercentage) { + Utils.checkNotNull(completionPercentage, "completionPercentage"); + this.completionPercentage = completionPercentage; + return this; + } + + /** + * Start date of the project + */ + public ProjectUpdateInput withStartDate(LocalDate startDate) { + Utils.checkNotNull(startDate, "startDate"); + this.startDate = JsonNullable.of(startDate); + return this; + } + + /** + * Start date of the project + */ + public ProjectUpdateInput withStartDate(JsonNullable startDate) { + Utils.checkNotNull(startDate, "startDate"); + this.startDate = startDate; + return this; + } + + /** + * Expected or planned end date of the project + */ + public ProjectUpdateInput withEndDate(LocalDate endDate) { + Utils.checkNotNull(endDate, "endDate"); + this.endDate = JsonNullable.of(endDate); + return this; + } + + /** + * Expected or planned end date of the project + */ + public ProjectUpdateInput withEndDate(JsonNullable endDate) { + Utils.checkNotNull(endDate, "endDate"); + this.endDate = endDate; + return this; + } + + /** + * Actual end date of the project + */ + public ProjectUpdateInput withCompletionDate(LocalDate completionDate) { + Utils.checkNotNull(completionDate, "completionDate"); + this.completionDate = JsonNullable.of(completionDate); + return this; + } + + /** + * Actual end date of the project + */ + public ProjectUpdateInput withCompletionDate(JsonNullable completionDate) { + Utils.checkNotNull(completionDate, "completionDate"); + this.completionDate = completionDate; + return this; + } + + /** + * The customer this entity is linked to. + */ + public ProjectUpdateInput withCustomer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public ProjectUpdateInput withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * Department or organizational unit associated with the project + */ + public ProjectUpdateInput withDepartment(ProjectUpdateInputDepartment department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + /** + * Department or organizational unit associated with the project + */ + public ProjectUpdateInput withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public ProjectUpdateInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public ProjectUpdateInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + /** + * ID of the user who owns/manages this project + */ + public ProjectUpdateInput withOwnerId(String ownerId) { + Utils.checkNotNull(ownerId, "ownerId"); + this.ownerId = JsonNullable.of(ownerId); + return this; + } + + /** + * ID of the user who owns/manages this project + */ + public ProjectUpdateInput withOwnerId(JsonNullable ownerId) { + Utils.checkNotNull(ownerId, "ownerId"); + this.ownerId = ownerId; + return this; + } + + /** + * Parent project if this is a subproject + */ + public ProjectUpdateInput withParentProject(ProjectUpdateInputParentProject parentProject) { + Utils.checkNotNull(parentProject, "parentProject"); + this.parentProject = JsonNullable.of(parentProject); + return this; + } + + /** + * Parent project if this is a subproject + */ + public ProjectUpdateInput withParentProject(JsonNullable parentProject) { + Utils.checkNotNull(parentProject, "parentProject"); + this.parentProject = parentProject; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ProjectUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public ProjectUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Total budgeted amount for the project + */ + public ProjectUpdateInput withBudgetAmount(double budgetAmount) { + Utils.checkNotNull(budgetAmount, "budgetAmount"); + this.budgetAmount = JsonNullable.of(budgetAmount); + return this; + } + + /** + * Total budgeted amount for the project + */ + public ProjectUpdateInput withBudgetAmount(JsonNullable budgetAmount) { + Utils.checkNotNull(budgetAmount, "budgetAmount"); + this.budgetAmount = budgetAmount; + return this; + } + + /** + * Approved budget amount for the project + */ + public ProjectUpdateInput withApprovedAmount(double approvedAmount) { + Utils.checkNotNull(approvedAmount, "approvedAmount"); + this.approvedAmount = JsonNullable.of(approvedAmount); + return this; + } + + /** + * Approved budget amount for the project + */ + public ProjectUpdateInput withApprovedAmount(JsonNullable approvedAmount) { + Utils.checkNotNull(approvedAmount, "approvedAmount"); + this.approvedAmount = approvedAmount; + return this; + } + + /** + * Total budgeted hours for the project + */ + public ProjectUpdateInput withBudgetHours(double budgetHours) { + Utils.checkNotNull(budgetHours, "budgetHours"); + this.budgetHours = JsonNullable.of(budgetHours); + return this; + } + + /** + * Total budgeted hours for the project + */ + public ProjectUpdateInput withBudgetHours(JsonNullable budgetHours) { + Utils.checkNotNull(budgetHours, "budgetHours"); + this.budgetHours = budgetHours; + return this; + } + + /** + * Default hourly rate for project work + */ + public ProjectUpdateInput withHourlyRate(double hourlyRate) { + Utils.checkNotNull(hourlyRate, "hourlyRate"); + this.hourlyRate = JsonNullable.of(hourlyRate); + return this; + } + + /** + * Default hourly rate for project work + */ + public ProjectUpdateInput withHourlyRate(JsonNullable hourlyRate) { + Utils.checkNotNull(hourlyRate, "hourlyRate"); + this.hourlyRate = hourlyRate; + return this; + } + + /** + * Method used for billing this project + */ + public ProjectUpdateInput withBillingMethod(ProjectUpdateInputBillingMethod billingMethod) { + Utils.checkNotNull(billingMethod, "billingMethod"); + this.billingMethod = JsonNullable.of(billingMethod); + return this; + } + + /** + * Method used for billing this project + */ + public ProjectUpdateInput withBillingMethod(JsonNullable billingMethod) { + Utils.checkNotNull(billingMethod, "billingMethod"); + this.billingMethod = billingMethod; + return this; + } + + /** + * Indicates if the project is billable to the customer + */ + public ProjectUpdateInput withIsBillable(boolean isBillable) { + Utils.checkNotNull(isBillable, "isBillable"); + this.isBillable = JsonNullable.of(isBillable); + return this; + } + + /** + * Indicates if the project is billable to the customer + */ + public ProjectUpdateInput withIsBillable(JsonNullable isBillable) { + Utils.checkNotNull(isBillable, "isBillable"); + this.isBillable = isBillable; + return this; + } + + /** + * Current phase of the project lifecycle + */ + public ProjectUpdateInput withPhase(ProjectUpdateInputProjectPhase phase) { + Utils.checkNotNull(phase, "phase"); + this.phase = JsonNullable.of(phase); + return this; + } + + /** + * Current phase of the project lifecycle + */ + public ProjectUpdateInput withPhase(JsonNullable phase) { + Utils.checkNotNull(phase, "phase"); + this.phase = phase; + return this; + } + + public ProjectUpdateInput withTaxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + + public ProjectUpdateInput withTaxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + /** + * A list of linked tracking categories. + */ + public ProjectUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public ProjectUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + /** + * Tags associated with the project + */ + public ProjectUpdateInput withTags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = Optional.ofNullable(tags); + return this; + } + + + /** + * Tags associated with the project + */ + public ProjectUpdateInput withTags(Optional> tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + /** + * Additional notes about the project + */ + public ProjectUpdateInput withNotes(String notes) { + Utils.checkNotNull(notes, "notes"); + this.notes = JsonNullable.of(notes); + return this; + } + + /** + * Additional notes about the project + */ + public ProjectUpdateInput withNotes(JsonNullable notes) { + Utils.checkNotNull(notes, "notes"); + this.notes = notes; + return this; + } + + /** + * Contract or agreement number associated with the project + */ + public ProjectUpdateInput withContractNumber(String contractNumber) { + Utils.checkNotNull(contractNumber, "contractNumber"); + this.contractNumber = JsonNullable.of(contractNumber); + return this; + } + + /** + * Contract or agreement number associated with the project + */ + public ProjectUpdateInput withContractNumber(JsonNullable contractNumber) { + Utils.checkNotNull(contractNumber, "contractNumber"); + this.contractNumber = contractNumber; + return this; + } + + /** + * Expected profit margin percentage for the project + */ + public ProjectUpdateInput withProfitMargin(double profitMargin) { + Utils.checkNotNull(profitMargin, "profitMargin"); + this.profitMargin = JsonNullable.of(profitMargin); + return this; + } + + /** + * Expected profit margin percentage for the project + */ + public ProjectUpdateInput withProfitMargin(JsonNullable profitMargin) { + Utils.checkNotNull(profitMargin, "profitMargin"); + this.profitMargin = profitMargin; + return this; + } + + /** + * Current status of project schedule compared to plan + */ + public ProjectUpdateInput withScheduleStatus(ProjectUpdateInputScheduleStatus scheduleStatus) { + Utils.checkNotNull(scheduleStatus, "scheduleStatus"); + this.scheduleStatus = JsonNullable.of(scheduleStatus); + return this; + } + + /** + * Current status of project schedule compared to plan + */ + public ProjectUpdateInput withScheduleStatus(JsonNullable scheduleStatus) { + Utils.checkNotNull(scheduleStatus, "scheduleStatus"); + this.scheduleStatus = scheduleStatus; + return this; + } + + /** + * An array of addresses associated with the project (billing, job site, etc.) + */ + public ProjectUpdateInput withAddresses(List

addresses) { + Utils.checkNotNull(addresses, "addresses"); + this.addresses = Optional.ofNullable(addresses); + return this; + } + + + /** + * An array of addresses associated with the project (billing, job site, etc.) + */ + public ProjectUpdateInput withAddresses(Optional> addresses) { + Utils.checkNotNull(addresses, "addresses"); + this.addresses = addresses; + return this; + } + + /** + * Number of team members assigned to the project + */ + public ProjectUpdateInput withTeamSize(long teamSize) { + Utils.checkNotNull(teamSize, "teamSize"); + this.teamSize = JsonNullable.of(teamSize); + return this; + } + + /** + * Number of team members assigned to the project + */ + public ProjectUpdateInput withTeamSize(JsonNullable teamSize) { + Utils.checkNotNull(teamSize, "teamSize"); + this.teamSize = teamSize; + return this; + } + + public ProjectUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public ProjectUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ProjectUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public ProjectUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectUpdateInput other = (ProjectUpdateInput) o; + return + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.displayId, other.displayId) && + Utils.enhancedDeepEquals(this.referenceId, other.referenceId) && + Utils.enhancedDeepEquals(this.description, other.description) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.active, other.active) && + Utils.enhancedDeepEquals(this.projectType, other.projectType) && + Utils.enhancedDeepEquals(this.priority, other.priority) && + Utils.enhancedDeepEquals(this.completionPercentage, other.completionPercentage) && + Utils.enhancedDeepEquals(this.startDate, other.startDate) && + Utils.enhancedDeepEquals(this.endDate, other.endDate) && + Utils.enhancedDeepEquals(this.completionDate, other.completionDate) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.ownerId, other.ownerId) && + Utils.enhancedDeepEquals(this.parentProject, other.parentProject) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.budgetAmount, other.budgetAmount) && + Utils.enhancedDeepEquals(this.approvedAmount, other.approvedAmount) && + Utils.enhancedDeepEquals(this.budgetHours, other.budgetHours) && + Utils.enhancedDeepEquals(this.hourlyRate, other.hourlyRate) && + Utils.enhancedDeepEquals(this.billingMethod, other.billingMethod) && + Utils.enhancedDeepEquals(this.isBillable, other.isBillable) && + Utils.enhancedDeepEquals(this.phase, other.phase) && + Utils.enhancedDeepEquals(this.taxRate, other.taxRate) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.tags, other.tags) && + Utils.enhancedDeepEquals(this.notes, other.notes) && + Utils.enhancedDeepEquals(this.contractNumber, other.contractNumber) && + Utils.enhancedDeepEquals(this.profitMargin, other.profitMargin) && + Utils.enhancedDeepEquals(this.scheduleStatus, other.scheduleStatus) && + Utils.enhancedDeepEquals(this.addresses, other.addresses) && + Utils.enhancedDeepEquals(this.teamSize, other.teamSize) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + name, displayId, referenceId, + description, status, active, + projectType, priority, completionPercentage, + startDate, endDate, completionDate, + customer, department, companyId, + ownerId, parentProject, currency, + budgetAmount, approvedAmount, budgetHours, + hourlyRate, billingMethod, isBillable, + phase, taxRate, trackingCategories, + tags, notes, contractNumber, + profitMargin, scheduleStatus, addresses, + teamSize, customFields, rowVersion); + } + + @Override + public String toString() { + return Utils.toString(ProjectUpdateInput.class, + "name", name, + "displayId", displayId, + "referenceId", referenceId, + "description", description, + "status", status, + "active", active, + "projectType", projectType, + "priority", priority, + "completionPercentage", completionPercentage, + "startDate", startDate, + "endDate", endDate, + "completionDate", completionDate, + "customer", customer, + "department", department, + "companyId", companyId, + "ownerId", ownerId, + "parentProject", parentProject, + "currency", currency, + "budgetAmount", budgetAmount, + "approvedAmount", approvedAmount, + "budgetHours", budgetHours, + "hourlyRate", hourlyRate, + "billingMethod", billingMethod, + "isBillable", isBillable, + "phase", phase, + "taxRate", taxRate, + "trackingCategories", trackingCategories, + "tags", tags, + "notes", notes, + "contractNumber", contractNumber, + "profitMargin", profitMargin, + "scheduleStatus", scheduleStatus, + "addresses", addresses, + "teamSize", teamSize, + "customFields", customFields, + "rowVersion", rowVersion); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional name = Optional.empty(); + + private JsonNullable displayId = JsonNullable.undefined(); + + private JsonNullable referenceId = JsonNullable.undefined(); + + private JsonNullable description = JsonNullable.undefined(); + + private JsonNullable status = JsonNullable.undefined(); + + private JsonNullable active = JsonNullable.undefined(); + + private JsonNullable projectType = JsonNullable.undefined(); + + private JsonNullable priority = JsonNullable.undefined(); + + private JsonNullable completionPercentage = JsonNullable.undefined(); + + private JsonNullable startDate = JsonNullable.undefined(); + + private JsonNullable endDate = JsonNullable.undefined(); + + private JsonNullable completionDate = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable ownerId = JsonNullable.undefined(); + + private JsonNullable parentProject = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable budgetAmount = JsonNullable.undefined(); + + private JsonNullable approvedAmount = JsonNullable.undefined(); + + private JsonNullable budgetHours = JsonNullable.undefined(); + + private JsonNullable hourlyRate = JsonNullable.undefined(); + + private JsonNullable billingMethod = JsonNullable.undefined(); + + private JsonNullable isBillable; + + private JsonNullable phase = JsonNullable.undefined(); + + private Optional taxRate = Optional.empty(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> tags = Optional.empty(); + + private JsonNullable notes = JsonNullable.undefined(); + + private JsonNullable contractNumber = JsonNullable.undefined(); + + private JsonNullable profitMargin = JsonNullable.undefined(); + + private JsonNullable scheduleStatus = JsonNullable.undefined(); + + private Optional> addresses = Optional.empty(); + + private JsonNullable teamSize = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Name of the project + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * Name of the project + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + + /** + * User-friendly project identifier + */ + public Builder displayId(String displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = JsonNullable.of(displayId); + return this; + } + + /** + * User-friendly project identifier + */ + public Builder displayId(JsonNullable displayId) { + Utils.checkNotNull(displayId, "displayId"); + this.displayId = displayId; + return this; + } + + + /** + * External reference identifier for the project + */ + public Builder referenceId(String referenceId) { + Utils.checkNotNull(referenceId, "referenceId"); + this.referenceId = JsonNullable.of(referenceId); + return this; + } + + /** + * External reference identifier for the project + */ + public Builder referenceId(JsonNullable referenceId) { + Utils.checkNotNull(referenceId, "referenceId"); + this.referenceId = referenceId; + return this; + } + + + /** + * Detailed description of the project + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = JsonNullable.of(description); + return this; + } + + /** + * Detailed description of the project + */ + public Builder description(JsonNullable description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + + /** + * Current status of the project + */ + public Builder status(ProjectUpdateInputProjectStatus status) { + Utils.checkNotNull(status, "status"); + this.status = JsonNullable.of(status); + return this; + } + + /** + * Current status of the project + */ + public Builder status(JsonNullable status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * Indicates whether the project is currently active or inactive + */ + public Builder active(boolean active) { + Utils.checkNotNull(active, "active"); + this.active = JsonNullable.of(active); + return this; + } + + /** + * Indicates whether the project is currently active or inactive + */ + public Builder active(JsonNullable active) { + Utils.checkNotNull(active, "active"); + this.active = active; + return this; + } + + + /** + * Type or category of the project + */ + public Builder projectType(ProjectUpdateInputProjectType projectType) { + Utils.checkNotNull(projectType, "projectType"); + this.projectType = JsonNullable.of(projectType); + return this; + } + + /** + * Type or category of the project + */ + public Builder projectType(JsonNullable projectType) { + Utils.checkNotNull(projectType, "projectType"); + this.projectType = projectType; + return this; + } + + + /** + * Priority level of the project + */ + public Builder priority(ProjectUpdateInputPriority priority) { + Utils.checkNotNull(priority, "priority"); + this.priority = JsonNullable.of(priority); + return this; + } + + /** + * Priority level of the project + */ + public Builder priority(JsonNullable priority) { + Utils.checkNotNull(priority, "priority"); + this.priority = priority; + return this; + } + + + /** + * Percentage of project completion (0-100) + */ + public Builder completionPercentage(double completionPercentage) { + Utils.checkNotNull(completionPercentage, "completionPercentage"); + this.completionPercentage = JsonNullable.of(completionPercentage); + return this; + } + + /** + * Percentage of project completion (0-100) + */ + public Builder completionPercentage(JsonNullable completionPercentage) { + Utils.checkNotNull(completionPercentage, "completionPercentage"); + this.completionPercentage = completionPercentage; + return this; + } + + + /** + * Start date of the project + */ + public Builder startDate(LocalDate startDate) { + Utils.checkNotNull(startDate, "startDate"); + this.startDate = JsonNullable.of(startDate); + return this; + } + + /** + * Start date of the project + */ + public Builder startDate(JsonNullable startDate) { + Utils.checkNotNull(startDate, "startDate"); + this.startDate = startDate; + return this; + } + + + /** + * Expected or planned end date of the project + */ + public Builder endDate(LocalDate endDate) { + Utils.checkNotNull(endDate, "endDate"); + this.endDate = JsonNullable.of(endDate); + return this; + } + + /** + * Expected or planned end date of the project + */ + public Builder endDate(JsonNullable endDate) { + Utils.checkNotNull(endDate, "endDate"); + this.endDate = endDate; + return this; + } + + + /** + * Actual end date of the project + */ + public Builder completionDate(LocalDate completionDate) { + Utils.checkNotNull(completionDate, "completionDate"); + this.completionDate = JsonNullable.of(completionDate); + return this; + } + + /** + * Actual end date of the project + */ + public Builder completionDate(JsonNullable completionDate) { + Utils.checkNotNull(completionDate, "completionDate"); + this.completionDate = completionDate; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * Department or organizational unit associated with the project + */ + public Builder department(ProjectUpdateInputDepartment department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + /** + * Department or organizational unit associated with the project + */ + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + /** + * ID of the user who owns/manages this project + */ + public Builder ownerId(String ownerId) { + Utils.checkNotNull(ownerId, "ownerId"); + this.ownerId = JsonNullable.of(ownerId); + return this; + } + + /** + * ID of the user who owns/manages this project + */ + public Builder ownerId(JsonNullable ownerId) { + Utils.checkNotNull(ownerId, "ownerId"); + this.ownerId = ownerId; + return this; + } + + + /** + * Parent project if this is a subproject + */ + public Builder parentProject(ProjectUpdateInputParentProject parentProject) { + Utils.checkNotNull(parentProject, "parentProject"); + this.parentProject = JsonNullable.of(parentProject); + return this; + } + + /** + * Parent project if this is a subproject + */ + public Builder parentProject(JsonNullable parentProject) { + Utils.checkNotNull(parentProject, "parentProject"); + this.parentProject = parentProject; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Total budgeted amount for the project + */ + public Builder budgetAmount(double budgetAmount) { + Utils.checkNotNull(budgetAmount, "budgetAmount"); + this.budgetAmount = JsonNullable.of(budgetAmount); + return this; + } + + /** + * Total budgeted amount for the project + */ + public Builder budgetAmount(JsonNullable budgetAmount) { + Utils.checkNotNull(budgetAmount, "budgetAmount"); + this.budgetAmount = budgetAmount; + return this; + } + + + /** + * Approved budget amount for the project + */ + public Builder approvedAmount(double approvedAmount) { + Utils.checkNotNull(approvedAmount, "approvedAmount"); + this.approvedAmount = JsonNullable.of(approvedAmount); + return this; + } + + /** + * Approved budget amount for the project + */ + public Builder approvedAmount(JsonNullable approvedAmount) { + Utils.checkNotNull(approvedAmount, "approvedAmount"); + this.approvedAmount = approvedAmount; + return this; + } + + + /** + * Total budgeted hours for the project + */ + public Builder budgetHours(double budgetHours) { + Utils.checkNotNull(budgetHours, "budgetHours"); + this.budgetHours = JsonNullable.of(budgetHours); + return this; + } + + /** + * Total budgeted hours for the project + */ + public Builder budgetHours(JsonNullable budgetHours) { + Utils.checkNotNull(budgetHours, "budgetHours"); + this.budgetHours = budgetHours; + return this; + } + + + /** + * Default hourly rate for project work + */ + public Builder hourlyRate(double hourlyRate) { + Utils.checkNotNull(hourlyRate, "hourlyRate"); + this.hourlyRate = JsonNullable.of(hourlyRate); + return this; + } + + /** + * Default hourly rate for project work + */ + public Builder hourlyRate(JsonNullable hourlyRate) { + Utils.checkNotNull(hourlyRate, "hourlyRate"); + this.hourlyRate = hourlyRate; + return this; + } + + + /** + * Method used for billing this project + */ + public Builder billingMethod(ProjectUpdateInputBillingMethod billingMethod) { + Utils.checkNotNull(billingMethod, "billingMethod"); + this.billingMethod = JsonNullable.of(billingMethod); + return this; + } + + /** + * Method used for billing this project + */ + public Builder billingMethod(JsonNullable billingMethod) { + Utils.checkNotNull(billingMethod, "billingMethod"); + this.billingMethod = billingMethod; + return this; + } + + + /** + * Indicates if the project is billable to the customer + */ + public Builder isBillable(boolean isBillable) { + Utils.checkNotNull(isBillable, "isBillable"); + this.isBillable = JsonNullable.of(isBillable); + return this; + } + + /** + * Indicates if the project is billable to the customer + */ + public Builder isBillable(JsonNullable isBillable) { + Utils.checkNotNull(isBillable, "isBillable"); + this.isBillable = isBillable; + return this; + } + + + /** + * Current phase of the project lifecycle + */ + public Builder phase(ProjectUpdateInputProjectPhase phase) { + Utils.checkNotNull(phase, "phase"); + this.phase = JsonNullable.of(phase); + return this; + } + + /** + * Current phase of the project lifecycle + */ + public Builder phase(JsonNullable phase) { + Utils.checkNotNull(phase, "phase"); + this.phase = phase; + return this; + } + + + public Builder taxRate(LinkedTaxRateInput taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = Optional.ofNullable(taxRate); + return this; + } + + public Builder taxRate(Optional taxRate) { + Utils.checkNotNull(taxRate, "taxRate"); + this.taxRate = taxRate; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + /** + * Tags associated with the project + */ + public Builder tags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = Optional.ofNullable(tags); + return this; + } + + /** + * Tags associated with the project + */ + public Builder tags(Optional> tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + + /** + * Additional notes about the project + */ + public Builder notes(String notes) { + Utils.checkNotNull(notes, "notes"); + this.notes = JsonNullable.of(notes); + return this; + } + + /** + * Additional notes about the project + */ + public Builder notes(JsonNullable notes) { + Utils.checkNotNull(notes, "notes"); + this.notes = notes; + return this; + } + + + /** + * Contract or agreement number associated with the project + */ + public Builder contractNumber(String contractNumber) { + Utils.checkNotNull(contractNumber, "contractNumber"); + this.contractNumber = JsonNullable.of(contractNumber); + return this; + } + + /** + * Contract or agreement number associated with the project + */ + public Builder contractNumber(JsonNullable contractNumber) { + Utils.checkNotNull(contractNumber, "contractNumber"); + this.contractNumber = contractNumber; + return this; + } + + + /** + * Expected profit margin percentage for the project + */ + public Builder profitMargin(double profitMargin) { + Utils.checkNotNull(profitMargin, "profitMargin"); + this.profitMargin = JsonNullable.of(profitMargin); + return this; + } + + /** + * Expected profit margin percentage for the project + */ + public Builder profitMargin(JsonNullable profitMargin) { + Utils.checkNotNull(profitMargin, "profitMargin"); + this.profitMargin = profitMargin; + return this; + } + + + /** + * Current status of project schedule compared to plan + */ + public Builder scheduleStatus(ProjectUpdateInputScheduleStatus scheduleStatus) { + Utils.checkNotNull(scheduleStatus, "scheduleStatus"); + this.scheduleStatus = JsonNullable.of(scheduleStatus); + return this; + } + + /** + * Current status of project schedule compared to plan + */ + public Builder scheduleStatus(JsonNullable scheduleStatus) { + Utils.checkNotNull(scheduleStatus, "scheduleStatus"); + this.scheduleStatus = scheduleStatus; + return this; + } + + + /** + * An array of addresses associated with the project (billing, job site, etc.) + */ + public Builder addresses(List
addresses) { + Utils.checkNotNull(addresses, "addresses"); + this.addresses = Optional.ofNullable(addresses); + return this; + } + + /** + * An array of addresses associated with the project (billing, job site, etc.) + */ + public Builder addresses(Optional> addresses) { + Utils.checkNotNull(addresses, "addresses"); + this.addresses = addresses; + return this; + } + + + /** + * Number of team members assigned to the project + */ + public Builder teamSize(long teamSize) { + Utils.checkNotNull(teamSize, "teamSize"); + this.teamSize = JsonNullable.of(teamSize); + return this; + } + + /** + * Number of team members assigned to the project + */ + public Builder teamSize(JsonNullable teamSize) { + Utils.checkNotNull(teamSize, "teamSize"); + this.teamSize = teamSize; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + public ProjectUpdateInput build() { + if (isBillable == null) { + isBillable = _SINGLETON_VALUE_IsBillable.value(); + } + + return new ProjectUpdateInput( + name, displayId, referenceId, + description, status, active, + projectType, priority, completionPercentage, + startDate, endDate, completionDate, + customer, department, companyId, + ownerId, parentProject, currency, + budgetAmount, approvedAmount, budgetHours, + hourlyRate, billingMethod, isBillable, + phase, taxRate, trackingCategories, + tags, notes, contractNumber, + profitMargin, scheduleStatus, addresses, + teamSize, customFields, rowVersion); + } + + + private static final LazySingletonValue> _SINGLETON_VALUE_IsBillable = + new LazySingletonValue<>( + "is_billable", + "true", + new TypeReference>() {}); + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputBillingMethod.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputBillingMethod.java new file mode 100644 index 000000000..3dffc0a26 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputBillingMethod.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ProjectUpdateInputBillingMethod + * + *

Method used for billing this project + */ +public class ProjectUpdateInputBillingMethod { + + public static final ProjectUpdateInputBillingMethod FIXED_PRICE = new ProjectUpdateInputBillingMethod("fixed_price"); + public static final ProjectUpdateInputBillingMethod TIME_AND_MATERIALS = new ProjectUpdateInputBillingMethod("time_and_materials"); + public static final ProjectUpdateInputBillingMethod MILESTONE_BASED = new ProjectUpdateInputBillingMethod("milestone_based"); + public static final ProjectUpdateInputBillingMethod RETAINER = new ProjectUpdateInputBillingMethod("retainer"); + public static final ProjectUpdateInputBillingMethod NON_BILLABLE = new ProjectUpdateInputBillingMethod("non_billable"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ProjectUpdateInputBillingMethod(String value) { + this.value = value; + } + + /** + * Returns a ProjectUpdateInputBillingMethod with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ProjectUpdateInputBillingMethod + */ + @JsonCreator + public static ProjectUpdateInputBillingMethod of(String value) { + synchronized (ProjectUpdateInputBillingMethod.class) { + return values.computeIfAbsent(value, v -> new ProjectUpdateInputBillingMethod(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectUpdateInputBillingMethod other = (ProjectUpdateInputBillingMethod) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ProjectUpdateInputBillingMethod [value=" + value + "]"; + } + + // return an array just like an enum + public static ProjectUpdateInputBillingMethod[] values() { + synchronized (ProjectUpdateInputBillingMethod.class) { + return values.values().toArray(new ProjectUpdateInputBillingMethod[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("fixed_price", FIXED_PRICE); + map.put("time_and_materials", TIME_AND_MATERIALS); + map.put("milestone_based", MILESTONE_BASED); + map.put("retainer", RETAINER); + map.put("non_billable", NON_BILLABLE); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("fixed_price", ProjectUpdateInputBillingMethodEnum.FIXED_PRICE); + map.put("time_and_materials", ProjectUpdateInputBillingMethodEnum.TIME_AND_MATERIALS); + map.put("milestone_based", ProjectUpdateInputBillingMethodEnum.MILESTONE_BASED); + map.put("retainer", ProjectUpdateInputBillingMethodEnum.RETAINER); + map.put("non_billable", ProjectUpdateInputBillingMethodEnum.NON_BILLABLE); + return map; + } + + + public enum ProjectUpdateInputBillingMethodEnum { + + FIXED_PRICE("fixed_price"), + TIME_AND_MATERIALS("time_and_materials"), + MILESTONE_BASED("milestone_based"), + RETAINER("retainer"), + NON_BILLABLE("non_billable"),; + + private final String value; + + private ProjectUpdateInputBillingMethodEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputDepartment.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputDepartment.java new file mode 100644 index 000000000..181218a96 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputDepartment.java @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * ProjectUpdateInputDepartment + * + *

Department or organizational unit associated with the project + */ +public class ProjectUpdateInputDepartment { + /** + * Unique identifier for the department + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * Name of the department + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonCreator + public ProjectUpdateInputDepartment( + @JsonProperty("id") Optional id, + @JsonProperty("name") Optional name) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + this.id = id; + this.name = name; + } + + public ProjectUpdateInputDepartment() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Unique identifier for the department + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * Name of the department + */ + @JsonIgnore + public Optional name() { + return name; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique identifier for the department + */ + public ProjectUpdateInputDepartment withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * Unique identifier for the department + */ + public ProjectUpdateInputDepartment withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Name of the department + */ + public ProjectUpdateInputDepartment withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * Name of the department + */ + public ProjectUpdateInputDepartment withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectUpdateInputDepartment other = (ProjectUpdateInputDepartment) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name); + } + + @Override + public String toString() { + return Utils.toString(ProjectUpdateInputDepartment.class, + "id", id, + "name", name); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Unique identifier for the department + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * Unique identifier for the department + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Name of the department + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * Name of the department + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public ProjectUpdateInputDepartment build() { + + return new ProjectUpdateInputDepartment( + id, name); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputParentProject.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputParentProject.java new file mode 100644 index 000000000..aac08ea14 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputParentProject.java @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * ProjectUpdateInputParentProject + * + *

Parent project if this is a subproject + */ +public class ProjectUpdateInputParentProject { + /** + * Unique identifier for the parent project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * Name of the parent project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonCreator + public ProjectUpdateInputParentProject( + @JsonProperty("id") Optional id, + @JsonProperty("name") Optional name) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + this.id = id; + this.name = name; + } + + public ProjectUpdateInputParentProject() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Unique identifier for the parent project + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * Name of the parent project + */ + @JsonIgnore + public Optional name() { + return name; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique identifier for the parent project + */ + public ProjectUpdateInputParentProject withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + + /** + * Unique identifier for the parent project + */ + public ProjectUpdateInputParentProject withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Name of the parent project + */ + public ProjectUpdateInputParentProject withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + + /** + * Name of the parent project + */ + public ProjectUpdateInputParentProject withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectUpdateInputParentProject other = (ProjectUpdateInputParentProject) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name); + } + + @Override + public String toString() { + return Utils.toString(ProjectUpdateInputParentProject.class, + "id", id, + "name", name); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Unique identifier for the parent project + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * Unique identifier for the parent project + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + + /** + * Name of the parent project + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * Name of the parent project + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public ProjectUpdateInputParentProject build() { + + return new ProjectUpdateInputParentProject( + id, name); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputPriority.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputPriority.java new file mode 100644 index 000000000..e2731cd8d --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputPriority.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ProjectUpdateInputPriority + * + *

Priority level of the project + */ +public class ProjectUpdateInputPriority { + + public static final ProjectUpdateInputPriority LOW = new ProjectUpdateInputPriority("low"); + public static final ProjectUpdateInputPriority MEDIUM = new ProjectUpdateInputPriority("medium"); + public static final ProjectUpdateInputPriority HIGH = new ProjectUpdateInputPriority("high"); + public static final ProjectUpdateInputPriority CRITICAL = new ProjectUpdateInputPriority("critical"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ProjectUpdateInputPriority(String value) { + this.value = value; + } + + /** + * Returns a ProjectUpdateInputPriority with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ProjectUpdateInputPriority + */ + @JsonCreator + public static ProjectUpdateInputPriority of(String value) { + synchronized (ProjectUpdateInputPriority.class) { + return values.computeIfAbsent(value, v -> new ProjectUpdateInputPriority(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectUpdateInputPriority other = (ProjectUpdateInputPriority) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ProjectUpdateInputPriority [value=" + value + "]"; + } + + // return an array just like an enum + public static ProjectUpdateInputPriority[] values() { + synchronized (ProjectUpdateInputPriority.class) { + return values.values().toArray(new ProjectUpdateInputPriority[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("low", LOW); + map.put("medium", MEDIUM); + map.put("high", HIGH); + map.put("critical", CRITICAL); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("low", ProjectUpdateInputPriorityEnum.LOW); + map.put("medium", ProjectUpdateInputPriorityEnum.MEDIUM); + map.put("high", ProjectUpdateInputPriorityEnum.HIGH); + map.put("critical", ProjectUpdateInputPriorityEnum.CRITICAL); + return map; + } + + + public enum ProjectUpdateInputPriorityEnum { + + LOW("low"), + MEDIUM("medium"), + HIGH("high"), + CRITICAL("critical"),; + + private final String value; + + private ProjectUpdateInputPriorityEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectPhase.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectPhase.java new file mode 100644 index 000000000..42cd22299 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectPhase.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ProjectUpdateInputProjectPhase + * + *

Current phase of the project lifecycle + */ +public class ProjectUpdateInputProjectPhase { + + public static final ProjectUpdateInputProjectPhase INITIATION = new ProjectUpdateInputProjectPhase("initiation"); + public static final ProjectUpdateInputProjectPhase PLANNING = new ProjectUpdateInputProjectPhase("planning"); + public static final ProjectUpdateInputProjectPhase EXECUTION = new ProjectUpdateInputProjectPhase("execution"); + public static final ProjectUpdateInputProjectPhase MONITORING = new ProjectUpdateInputProjectPhase("monitoring"); + public static final ProjectUpdateInputProjectPhase CLOSURE = new ProjectUpdateInputProjectPhase("closure"); + public static final ProjectUpdateInputProjectPhase OTHER = new ProjectUpdateInputProjectPhase("other"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ProjectUpdateInputProjectPhase(String value) { + this.value = value; + } + + /** + * Returns a ProjectUpdateInputProjectPhase with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ProjectUpdateInputProjectPhase + */ + @JsonCreator + public static ProjectUpdateInputProjectPhase of(String value) { + synchronized (ProjectUpdateInputProjectPhase.class) { + return values.computeIfAbsent(value, v -> new ProjectUpdateInputProjectPhase(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectUpdateInputProjectPhase other = (ProjectUpdateInputProjectPhase) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ProjectUpdateInputProjectPhase [value=" + value + "]"; + } + + // return an array just like an enum + public static ProjectUpdateInputProjectPhase[] values() { + synchronized (ProjectUpdateInputProjectPhase.class) { + return values.values().toArray(new ProjectUpdateInputProjectPhase[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("initiation", INITIATION); + map.put("planning", PLANNING); + map.put("execution", EXECUTION); + map.put("monitoring", MONITORING); + map.put("closure", CLOSURE); + map.put("other", OTHER); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("initiation", ProjectUpdateInputProjectPhaseEnum.INITIATION); + map.put("planning", ProjectUpdateInputProjectPhaseEnum.PLANNING); + map.put("execution", ProjectUpdateInputProjectPhaseEnum.EXECUTION); + map.put("monitoring", ProjectUpdateInputProjectPhaseEnum.MONITORING); + map.put("closure", ProjectUpdateInputProjectPhaseEnum.CLOSURE); + map.put("other", ProjectUpdateInputProjectPhaseEnum.OTHER); + return map; + } + + + public enum ProjectUpdateInputProjectPhaseEnum { + + INITIATION("initiation"), + PLANNING("planning"), + EXECUTION("execution"), + MONITORING("monitoring"), + CLOSURE("closure"), + OTHER("other"),; + + private final String value; + + private ProjectUpdateInputProjectPhaseEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectStatus.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectStatus.java new file mode 100644 index 000000000..44ee7e13b --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectStatus.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ProjectUpdateInputProjectStatus + * + *

Current status of the project + */ +public class ProjectUpdateInputProjectStatus { + + public static final ProjectUpdateInputProjectStatus ACTIVE = new ProjectUpdateInputProjectStatus("active"); + public static final ProjectUpdateInputProjectStatus COMPLETED = new ProjectUpdateInputProjectStatus("completed"); + public static final ProjectUpdateInputProjectStatus ON_HOLD = new ProjectUpdateInputProjectStatus("on_hold"); + public static final ProjectUpdateInputProjectStatus CANCELLED = new ProjectUpdateInputProjectStatus("cancelled"); + public static final ProjectUpdateInputProjectStatus DRAFT = new ProjectUpdateInputProjectStatus("draft"); + public static final ProjectUpdateInputProjectStatus IN_PROGRESS = new ProjectUpdateInputProjectStatus("in_progress"); + public static final ProjectUpdateInputProjectStatus APPROVED = new ProjectUpdateInputProjectStatus("approved"); + public static final ProjectUpdateInputProjectStatus OTHER = new ProjectUpdateInputProjectStatus("other"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ProjectUpdateInputProjectStatus(String value) { + this.value = value; + } + + /** + * Returns a ProjectUpdateInputProjectStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ProjectUpdateInputProjectStatus + */ + @JsonCreator + public static ProjectUpdateInputProjectStatus of(String value) { + synchronized (ProjectUpdateInputProjectStatus.class) { + return values.computeIfAbsent(value, v -> new ProjectUpdateInputProjectStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectUpdateInputProjectStatus other = (ProjectUpdateInputProjectStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ProjectUpdateInputProjectStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static ProjectUpdateInputProjectStatus[] values() { + synchronized (ProjectUpdateInputProjectStatus.class) { + return values.values().toArray(new ProjectUpdateInputProjectStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("active", ACTIVE); + map.put("completed", COMPLETED); + map.put("on_hold", ON_HOLD); + map.put("cancelled", CANCELLED); + map.put("draft", DRAFT); + map.put("in_progress", IN_PROGRESS); + map.put("approved", APPROVED); + map.put("other", OTHER); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("active", ProjectUpdateInputProjectStatusEnum.ACTIVE); + map.put("completed", ProjectUpdateInputProjectStatusEnum.COMPLETED); + map.put("on_hold", ProjectUpdateInputProjectStatusEnum.ON_HOLD); + map.put("cancelled", ProjectUpdateInputProjectStatusEnum.CANCELLED); + map.put("draft", ProjectUpdateInputProjectStatusEnum.DRAFT); + map.put("in_progress", ProjectUpdateInputProjectStatusEnum.IN_PROGRESS); + map.put("approved", ProjectUpdateInputProjectStatusEnum.APPROVED); + map.put("other", ProjectUpdateInputProjectStatusEnum.OTHER); + return map; + } + + + public enum ProjectUpdateInputProjectStatusEnum { + + ACTIVE("active"), + COMPLETED("completed"), + ON_HOLD("on_hold"), + CANCELLED("cancelled"), + DRAFT("draft"), + IN_PROGRESS("in_progress"), + APPROVED("approved"), + OTHER("other"),; + + private final String value; + + private ProjectUpdateInputProjectStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectType.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectType.java new file mode 100644 index 000000000..4f6bb66c5 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputProjectType.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ProjectUpdateInputProjectType + * + *

Type or category of the project + */ +public class ProjectUpdateInputProjectType { + + public static final ProjectUpdateInputProjectType CLIENT_PROJECT = new ProjectUpdateInputProjectType("client_project"); + public static final ProjectUpdateInputProjectType INTERNAL_PROJECT = new ProjectUpdateInputProjectType("internal_project"); + public static final ProjectUpdateInputProjectType MAINTENANCE = new ProjectUpdateInputProjectType("maintenance"); + public static final ProjectUpdateInputProjectType RESEARCH_DEVELOPMENT = new ProjectUpdateInputProjectType("research_development"); + public static final ProjectUpdateInputProjectType TRAINING = new ProjectUpdateInputProjectType("training"); + public static final ProjectUpdateInputProjectType OTHER = new ProjectUpdateInputProjectType("other"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ProjectUpdateInputProjectType(String value) { + this.value = value; + } + + /** + * Returns a ProjectUpdateInputProjectType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ProjectUpdateInputProjectType + */ + @JsonCreator + public static ProjectUpdateInputProjectType of(String value) { + synchronized (ProjectUpdateInputProjectType.class) { + return values.computeIfAbsent(value, v -> new ProjectUpdateInputProjectType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectUpdateInputProjectType other = (ProjectUpdateInputProjectType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ProjectUpdateInputProjectType [value=" + value + "]"; + } + + // return an array just like an enum + public static ProjectUpdateInputProjectType[] values() { + synchronized (ProjectUpdateInputProjectType.class) { + return values.values().toArray(new ProjectUpdateInputProjectType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("client_project", CLIENT_PROJECT); + map.put("internal_project", INTERNAL_PROJECT); + map.put("maintenance", MAINTENANCE); + map.put("research_development", RESEARCH_DEVELOPMENT); + map.put("training", TRAINING); + map.put("other", OTHER); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("client_project", ProjectUpdateInputProjectTypeEnum.CLIENT_PROJECT); + map.put("internal_project", ProjectUpdateInputProjectTypeEnum.INTERNAL_PROJECT); + map.put("maintenance", ProjectUpdateInputProjectTypeEnum.MAINTENANCE); + map.put("research_development", ProjectUpdateInputProjectTypeEnum.RESEARCH_DEVELOPMENT); + map.put("training", ProjectUpdateInputProjectTypeEnum.TRAINING); + map.put("other", ProjectUpdateInputProjectTypeEnum.OTHER); + return map; + } + + + public enum ProjectUpdateInputProjectTypeEnum { + + CLIENT_PROJECT("client_project"), + INTERNAL_PROJECT("internal_project"), + MAINTENANCE("maintenance"), + RESEARCH_DEVELOPMENT("research_development"), + TRAINING("training"), + OTHER("other"),; + + private final String value; + + private ProjectUpdateInputProjectTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputScheduleStatus.java b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputScheduleStatus.java new file mode 100644 index 000000000..115c070cf --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProjectUpdateInputScheduleStatus.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * ProjectUpdateInputScheduleStatus + * + *

Current status of project schedule compared to plan + */ +public class ProjectUpdateInputScheduleStatus { + + public static final ProjectUpdateInputScheduleStatus AHEAD_OF_SCHEDULE = new ProjectUpdateInputScheduleStatus("ahead_of_schedule"); + public static final ProjectUpdateInputScheduleStatus ON_SCHEDULE = new ProjectUpdateInputScheduleStatus("on_schedule"); + public static final ProjectUpdateInputScheduleStatus BEHIND_SCHEDULE = new ProjectUpdateInputScheduleStatus("behind_schedule"); + public static final ProjectUpdateInputScheduleStatus CRITICAL_DELAY = new ProjectUpdateInputScheduleStatus("critical_delay"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private ProjectUpdateInputScheduleStatus(String value) { + this.value = value; + } + + /** + * Returns a ProjectUpdateInputScheduleStatus with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as ProjectUpdateInputScheduleStatus + */ + @JsonCreator + public static ProjectUpdateInputScheduleStatus of(String value) { + synchronized (ProjectUpdateInputScheduleStatus.class) { + return values.computeIfAbsent(value, v -> new ProjectUpdateInputScheduleStatus(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectUpdateInputScheduleStatus other = (ProjectUpdateInputScheduleStatus) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "ProjectUpdateInputScheduleStatus [value=" + value + "]"; + } + + // return an array just like an enum + public static ProjectUpdateInputScheduleStatus[] values() { + synchronized (ProjectUpdateInputScheduleStatus.class) { + return values.values().toArray(new ProjectUpdateInputScheduleStatus[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("ahead_of_schedule", AHEAD_OF_SCHEDULE); + map.put("on_schedule", ON_SCHEDULE); + map.put("behind_schedule", BEHIND_SCHEDULE); + map.put("critical_delay", CRITICAL_DELAY); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("ahead_of_schedule", ProjectUpdateInputScheduleStatusEnum.AHEAD_OF_SCHEDULE); + map.put("on_schedule", ProjectUpdateInputScheduleStatusEnum.ON_SCHEDULE); + map.put("behind_schedule", ProjectUpdateInputScheduleStatusEnum.BEHIND_SCHEDULE); + map.put("critical_delay", ProjectUpdateInputScheduleStatusEnum.CRITICAL_DELAY); + return map; + } + + + public enum ProjectUpdateInputScheduleStatusEnum { + + AHEAD_OF_SCHEDULE("ahead_of_schedule"), + ON_SCHEDULE("on_schedule"), + BEHIND_SCHEDULE("behind_schedule"), + CRITICAL_DELAY("critical_delay"),; + + private final String value; + + private ProjectUpdateInputScheduleStatusEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/RefundUpdateInput.java b/src/main/java/com/apideck/unify/models/components/RefundUpdateInput.java new file mode 100644 index 000000000..3bb6568da --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/RefundUpdateInput.java @@ -0,0 +1,2002 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * RefundUpdateInput + * + *

The writable shape of Refund for a single-record update. Identical to the model with the read-only + * properties removed and no required properties, because PATCH is partial and the API already + * validates it that way. + */ +public class RefundUpdateInput { + /** + * Reference number for the refund. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * The company ID the transaction belongs to + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("company_id") + private JsonNullable companyId; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * The total amount of the transaction or record + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("refund_date") + private JsonNullable refundDate; + + /** + * Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state + * (draft/posted/voided), Zoho Books vis_state. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("status") + private Optional status; + + /** + * 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. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method") + private JsonNullable paymentMethod; + + /** + * Optional reference message returned by payment method on processing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_reference") + private JsonNullable paymentMethodReference; + + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_id") + private JsonNullable paymentMethodId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * Line items for itemized 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. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + /** + * 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. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allocations") + private Optional> allocations; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_code") + private JsonNullable taxCode; + + /** + * Discount percentage applied to this refund. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_percentage") + private JsonNullable discountPercentage; + + /** + * Discount amount applied to this refund. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_amount") + private JsonNullable discountAmount; + + /** + * Optional note to be associated with the refund. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Customer memo + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer_memo") + private JsonNullable customerMemo; + + /** + * Optional reference message for the refund. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("billing_address") + private Optional billingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("shipping_address") + private Optional shippingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("location") + private JsonNullable location; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public RefundUpdateInput( + @JsonProperty("number") JsonNullable number, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("company_id") JsonNullable companyId, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("refund_date") JsonNullable refundDate, + @JsonProperty("status") Optional status, + @JsonProperty("type") Optional type, + @JsonProperty("payment_method") JsonNullable paymentMethod, + @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, + @JsonProperty("payment_method_id") JsonNullable paymentMethodId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("allocations") Optional> allocations, + @JsonProperty("tax_code") JsonNullable taxCode, + @JsonProperty("discount_percentage") JsonNullable discountPercentage, + @JsonProperty("discount_amount") JsonNullable discountAmount, + @JsonProperty("note") JsonNullable note, + @JsonProperty("customer_memo") JsonNullable customerMemo, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("billing_address") Optional billingAddress, + @JsonProperty("shipping_address") Optional shippingAddress, + @JsonProperty("department") JsonNullable department, + @JsonProperty("location") JsonNullable location, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(companyId, "companyId"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(refundDate, "refundDate"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(type, "type"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(allocations, "allocations"); + Utils.checkNotNull(taxCode, "taxCode"); + Utils.checkNotNull(discountPercentage, "discountPercentage"); + Utils.checkNotNull(discountAmount, "discountAmount"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(customerMemo, "customerMemo"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(billingAddress, "billingAddress"); + Utils.checkNotNull(shippingAddress, "shippingAddress"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(location, "location"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.number = number; + this.customer = customer; + this.companyId = companyId; + this.currency = currency; + this.currencyRate = currencyRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalAmount = totalAmount; + this.totalTax = totalTax; + this.refundDate = refundDate; + this.status = status; + this.type = type; + this.paymentMethod = paymentMethod; + this.paymentMethodReference = paymentMethodReference; + this.paymentMethodId = paymentMethodId; + this.account = account; + this.lineItems = lineItems; + this.allocations = allocations; + this.taxCode = taxCode; + this.discountPercentage = discountPercentage; + this.discountAmount = discountAmount; + this.note = note; + this.customerMemo = customerMemo; + this.reference = reference; + this.billingAddress = billingAddress; + this.shippingAddress = shippingAddress; + this.department = department; + this.location = location; + this.trackingCategories = trackingCategories; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public RefundUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), Optional.empty(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty()); + } + + /** + * Reference number for the refund. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * The company ID the transaction belongs to + */ + @JsonIgnore + public JsonNullable companyId() { + return companyId; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * The total amount of the transaction or record + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable refundDate() { + return refundDate; + } + + /** + * Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state + * (draft/posted/voided), Zoho Books vis_state. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * 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. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonIgnore + public JsonNullable paymentMethod() { + return paymentMethod; + } + + /** + * Optional reference message returned by payment method on processing + */ + @JsonIgnore + public JsonNullable paymentMethodReference() { + return paymentMethodReference; + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable paymentMethodId() { + return paymentMethodId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * Line items for itemized 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. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + /** + * 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. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> allocations() { + return (Optional>) allocations; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonIgnore + public JsonNullable taxCode() { + return taxCode; + } + + /** + * Discount percentage applied to this refund. + */ + @JsonIgnore + public JsonNullable discountPercentage() { + return discountPercentage; + } + + /** + * Discount amount applied to this refund. + */ + @JsonIgnore + public JsonNullable discountAmount() { + return discountAmount; + } + + /** + * Optional note to be associated with the refund. + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Customer memo + */ + @JsonIgnore + public JsonNullable customerMemo() { + return customerMemo; + } + + /** + * Optional reference message for the refund. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional

billingAddress() { + return (Optional
) billingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional
shippingAddress() { + return (Optional
) shippingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable location() { + return (JsonNullable) location; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Reference number for the refund. + */ + public RefundUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the refund. + */ + public RefundUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The customer this entity is linked to. + */ + public RefundUpdateInput withCustomer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public RefundUpdateInput withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * The company ID the transaction belongs to + */ + public RefundUpdateInput withCompanyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public RefundUpdateInput withCompanyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public RefundUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public RefundUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public RefundUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public RefundUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * Amounts are including tax + */ + public RefundUpdateInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public RefundUpdateInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public RefundUpdateInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public RefundUpdateInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * The total amount of the transaction or record + */ + public RefundUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public RefundUpdateInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public RefundUpdateInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public RefundUpdateInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD + */ + public RefundUpdateInput withRefundDate(OffsetDateTime refundDate) { + Utils.checkNotNull(refundDate, "refundDate"); + this.refundDate = JsonNullable.of(refundDate); + return this; + } + + /** + * The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD + */ + public RefundUpdateInput withRefundDate(JsonNullable refundDate) { + Utils.checkNotNull(refundDate, "refundDate"); + this.refundDate = refundDate; + return this; + } + + /** + * Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state + * (draft/posted/voided), Zoho Books vis_state. + */ + public RefundUpdateInput withStatus(RefundStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + + /** + * Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state + * (draft/posted/voided), Zoho Books vis_state. + */ + public RefundUpdateInput withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * 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. + */ + public RefundUpdateInput withType(RefundType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + + /** + * 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. + */ + public RefundUpdateInput withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public RefundUpdateInput withPaymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public RefundUpdateInput withPaymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public RefundUpdateInput withPaymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public RefundUpdateInput withPaymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + /** + * A unique identifier for an object. + */ + public RefundUpdateInput withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public RefundUpdateInput withPaymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public RefundUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public RefundUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * 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. + */ + public RefundUpdateInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + /** + * 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. + */ + public RefundUpdateInput withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * 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. + */ + public RefundUpdateInput withAllocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + + /** + * 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. + */ + public RefundUpdateInput withAllocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public RefundUpdateInput withTaxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public RefundUpdateInput withTaxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + /** + * Discount percentage applied to this refund. + */ + public RefundUpdateInput withDiscountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this refund. + */ + public RefundUpdateInput withDiscountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + /** + * Discount amount applied to this refund. + */ + public RefundUpdateInput withDiscountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this refund. + */ + public RefundUpdateInput withDiscountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + /** + * Optional note to be associated with the refund. + */ + public RefundUpdateInput withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the refund. + */ + public RefundUpdateInput withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Customer memo + */ + public RefundUpdateInput withCustomerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public RefundUpdateInput withCustomerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + /** + * Optional reference message for the refund. + */ + public RefundUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the refund. + */ + public RefundUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + public RefundUpdateInput withBillingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + + public RefundUpdateInput withBillingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + public RefundUpdateInput withShippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + + public RefundUpdateInput withShippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + public RefundUpdateInput withDepartment(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public RefundUpdateInput withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + public RefundUpdateInput withLocation(LinkedLocationInput location) { + Utils.checkNotNull(location, "location"); + this.location = JsonNullable.of(location); + return this; + } + + public RefundUpdateInput withLocation(JsonNullable location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + /** + * A list of linked tracking categories. + */ + public RefundUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public RefundUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + public RefundUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public RefundUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public RefundUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public RefundUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public RefundUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public RefundUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RefundUpdateInput other = (RefundUpdateInput) o; + return + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.companyId, other.companyId) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.refundDate, other.refundDate) && + Utils.enhancedDeepEquals(this.status, other.status) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod) && + Utils.enhancedDeepEquals(this.paymentMethodReference, other.paymentMethodReference) && + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.allocations, other.allocations) && + Utils.enhancedDeepEquals(this.taxCode, other.taxCode) && + Utils.enhancedDeepEquals(this.discountPercentage, other.discountPercentage) && + Utils.enhancedDeepEquals(this.discountAmount, other.discountAmount) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.customerMemo, other.customerMemo) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.billingAddress, other.billingAddress) && + Utils.enhancedDeepEquals(this.shippingAddress, other.shippingAddress) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.location, other.location) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + number, customer, companyId, + currency, currencyRate, taxInclusive, + subTotal, totalAmount, totalTax, + refundDate, status, type, + paymentMethod, paymentMethodReference, paymentMethodId, + account, lineItems, allocations, + taxCode, discountPercentage, discountAmount, + note, customerMemo, reference, + billingAddress, shippingAddress, department, + location, trackingCategories, customFields, + rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(RefundUpdateInput.class, + "number", number, + "customer", customer, + "companyId", companyId, + "currency", currency, + "currencyRate", currencyRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalAmount", totalAmount, + "totalTax", totalTax, + "refundDate", refundDate, + "status", status, + "type", type, + "paymentMethod", paymentMethod, + "paymentMethodReference", paymentMethodReference, + "paymentMethodId", paymentMethodId, + "account", account, + "lineItems", lineItems, + "allocations", allocations, + "taxCode", taxCode, + "discountPercentage", discountPercentage, + "discountAmount", discountAmount, + "note", note, + "customerMemo", customerMemo, + "reference", reference, + "billingAddress", billingAddress, + "shippingAddress", shippingAddress, + "department", department, + "location", location, + "trackingCategories", trackingCategories, + "customFields", customFields, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + private JsonNullable companyId = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable refundDate = JsonNullable.undefined(); + + private Optional status = Optional.empty(); + + private Optional type = Optional.empty(); + + private JsonNullable paymentMethod = JsonNullable.undefined(); + + private JsonNullable paymentMethodReference = JsonNullable.undefined(); + + private JsonNullable paymentMethodId = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private Optional> allocations = Optional.empty(); + + private JsonNullable taxCode = JsonNullable.undefined(); + + private JsonNullable discountPercentage = JsonNullable.undefined(); + + private JsonNullable discountAmount = JsonNullable.undefined(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable customerMemo = JsonNullable.undefined(); + + private JsonNullable reference = JsonNullable.undefined(); + + private Optional billingAddress = Optional.empty(); + + private Optional shippingAddress = Optional.empty(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable location = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Reference number for the refund. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the refund. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(String companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = JsonNullable.of(companyId); + return this; + } + + /** + * The company ID the transaction belongs to + */ + public Builder companyId(JsonNullable companyId) { + Utils.checkNotNull(companyId, "companyId"); + this.companyId = companyId; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder refundDate(OffsetDateTime refundDate) { + Utils.checkNotNull(refundDate, "refundDate"); + this.refundDate = JsonNullable.of(refundDate); + return this; + } + + /** + * The date of the refund - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder refundDate(JsonNullable refundDate) { + Utils.checkNotNull(refundDate, "refundDate"); + this.refundDate = refundDate; + return this; + } + + + /** + * Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state + * (draft/posted/voided), Zoho Books vis_state. + */ + public Builder status(RefundStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Status of refund. Maps to: QBO (limited status), NetSuite CashRefund status, Sage Intacct state + * (draft/posted/voided), Zoho Books vis_state. + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + + /** + * 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. + */ + public Builder type(RefundType type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + /** + * 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. + */ + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * Line items for itemized 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. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + /** + * 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. + */ + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * 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. + */ + public Builder allocations(List allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = Optional.ofNullable(allocations); + return this; + } + + /** + * 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. + */ + public Builder allocations(Optional> allocations) { + Utils.checkNotNull(allocations, "allocations"); + this.allocations = allocations; + return this; + } + + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + + /** + * Discount percentage applied to this refund. + */ + public Builder discountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this refund. + */ + public Builder discountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + + /** + * Discount amount applied to this refund. + */ + public Builder discountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this refund. + */ + public Builder discountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + + /** + * Optional note to be associated with the refund. + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the refund. + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Customer memo + */ + public Builder customerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public Builder customerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + + /** + * Optional reference message for the refund. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the refund. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + public Builder billingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + public Builder billingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + + public Builder shippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + public Builder shippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + + public Builder department(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + public Builder location(LinkedLocationInput location) { + Utils.checkNotNull(location, "location"); + this.location = JsonNullable.of(location); + return this; + } + + public Builder location(JsonNullable location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public RefundUpdateInput build() { + + return new RefundUpdateInput( + number, customer, companyId, + currency, currencyRate, taxInclusive, + subTotal, totalAmount, totalTax, + refundDate, status, type, + paymentMethod, paymentMethodReference, paymentMethodId, + account, lineItems, allocations, + taxCode, discountPercentage, discountAmount, + note, customerMemo, reference, + billingAddress, shippingAddress, department, + location, trackingCategories, customFields, + rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/components/SalesReceiptUpdateInput.java b/src/main/java/com/apideck/unify/models/components/SalesReceiptUpdateInput.java new file mode 100644 index 000000000..3086ae6cf --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/SalesReceiptUpdateInput.java @@ -0,0 +1,1651 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.apideck.unify.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * SalesReceiptUpdateInput + * + *

The writable shape of SalesReceipt for a single-record update. Identical to the model with the + * read-only properties removed and no required properties, because PATCH is partial and the API + * already validates it that way. + */ +public class SalesReceiptUpdateInput { + /** + * Reference number for the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("number") + private JsonNullable number; + + /** + * The customer this entity is linked to. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer") + private JsonNullable customer; + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency") + private JsonNullable currency; + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("currency_rate") + private JsonNullable currencyRate; + + /** + * Amounts are including tax + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_inclusive") + private JsonNullable taxInclusive; + + /** + * Subtotal amount, normally before tax. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sub_total") + private JsonNullable subTotal; + + /** + * The total amount of the transaction or record + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_amount") + private JsonNullable totalAmount; + + /** + * Total tax amount applied to this transaction. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("total_tax") + private JsonNullable totalTax; + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("transaction_date") + private JsonNullable transactionDate; + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method") + private JsonNullable paymentMethod; + + /** + * Optional reference message returned by payment method on processing + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_reference") + private JsonNullable paymentMethodReference; + + /** + * A unique identifier for an object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payment_method_id") + private JsonNullable paymentMethodId; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account") + private JsonNullable account; + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("line_items") + private Optional> lineItems; + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tax_code") + private JsonNullable taxCode; + + /** + * Discount percentage applied to this sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_percentage") + private JsonNullable discountPercentage; + + /** + * Discount amount applied to this sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("discount_amount") + private JsonNullable discountAmount; + + /** + * Optional note to be associated with the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("note") + private JsonNullable note; + + /** + * Customer memo + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("customer_memo") + private JsonNullable customerMemo; + + /** + * Optional reference message for the sales receipt. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("reference") + private JsonNullable reference; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("billing_address") + private Optional billingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("shipping_address") + private Optional shippingAddress; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("department") + private JsonNullable department; + + /** + * A list of linked tracking categories. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tracking_categories") + private JsonNullable> trackingCategories; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("custom_fields") + private Optional> customFields; + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("row_version") + private JsonNullable rowVersion; + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pass_through") + private Optional> passThrough; + + @JsonCreator + public SalesReceiptUpdateInput( + @JsonProperty("number") JsonNullable number, + @JsonProperty("customer") JsonNullable customer, + @JsonProperty("currency") JsonNullable currency, + @JsonProperty("currency_rate") JsonNullable currencyRate, + @JsonProperty("tax_inclusive") JsonNullable taxInclusive, + @JsonProperty("sub_total") JsonNullable subTotal, + @JsonProperty("total_amount") JsonNullable totalAmount, + @JsonProperty("total_tax") JsonNullable totalTax, + @JsonProperty("transaction_date") JsonNullable transactionDate, + @JsonProperty("payment_method") JsonNullable paymentMethod, + @JsonProperty("payment_method_reference") JsonNullable paymentMethodReference, + @JsonProperty("payment_method_id") JsonNullable paymentMethodId, + @JsonProperty("account") JsonNullable account, + @JsonProperty("line_items") Optional> lineItems, + @JsonProperty("tax_code") JsonNullable taxCode, + @JsonProperty("discount_percentage") JsonNullable discountPercentage, + @JsonProperty("discount_amount") JsonNullable discountAmount, + @JsonProperty("note") JsonNullable note, + @JsonProperty("customer_memo") JsonNullable customerMemo, + @JsonProperty("reference") JsonNullable reference, + @JsonProperty("billing_address") Optional billingAddress, + @JsonProperty("shipping_address") Optional shippingAddress, + @JsonProperty("department") JsonNullable department, + @JsonProperty("tracking_categories") JsonNullable> trackingCategories, + @JsonProperty("custom_fields") Optional> customFields, + @JsonProperty("row_version") JsonNullable rowVersion, + @JsonProperty("pass_through") Optional> passThrough) { + Utils.checkNotNull(number, "number"); + Utils.checkNotNull(customer, "customer"); + Utils.checkNotNull(currency, "currency"); + Utils.checkNotNull(currencyRate, "currencyRate"); + Utils.checkNotNull(taxInclusive, "taxInclusive"); + Utils.checkNotNull(subTotal, "subTotal"); + Utils.checkNotNull(totalAmount, "totalAmount"); + Utils.checkNotNull(totalTax, "totalTax"); + Utils.checkNotNull(transactionDate, "transactionDate"); + Utils.checkNotNull(paymentMethod, "paymentMethod"); + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + Utils.checkNotNull(account, "account"); + Utils.checkNotNull(lineItems, "lineItems"); + Utils.checkNotNull(taxCode, "taxCode"); + Utils.checkNotNull(discountPercentage, "discountPercentage"); + Utils.checkNotNull(discountAmount, "discountAmount"); + Utils.checkNotNull(note, "note"); + Utils.checkNotNull(customerMemo, "customerMemo"); + Utils.checkNotNull(reference, "reference"); + Utils.checkNotNull(billingAddress, "billingAddress"); + Utils.checkNotNull(shippingAddress, "shippingAddress"); + Utils.checkNotNull(department, "department"); + Utils.checkNotNull(trackingCategories, "trackingCategories"); + Utils.checkNotNull(customFields, "customFields"); + Utils.checkNotNull(rowVersion, "rowVersion"); + Utils.checkNotNull(passThrough, "passThrough"); + this.number = number; + this.customer = customer; + this.currency = currency; + this.currencyRate = currencyRate; + this.taxInclusive = taxInclusive; + this.subTotal = subTotal; + this.totalAmount = totalAmount; + this.totalTax = totalTax; + this.transactionDate = transactionDate; + this.paymentMethod = paymentMethod; + this.paymentMethodReference = paymentMethodReference; + this.paymentMethodId = paymentMethodId; + this.account = account; + this.lineItems = lineItems; + this.taxCode = taxCode; + this.discountPercentage = discountPercentage; + this.discountAmount = discountAmount; + this.note = note; + this.customerMemo = customerMemo; + this.reference = reference; + this.billingAddress = billingAddress; + this.shippingAddress = shippingAddress; + this.department = department; + this.trackingCategories = trackingCategories; + this.customFields = customFields; + this.rowVersion = rowVersion; + this.passThrough = passThrough; + } + + public SalesReceiptUpdateInput() { + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty(), JsonNullable.undefined(), Optional.empty()); + } + + /** + * Reference number for the sales receipt. + */ + @JsonIgnore + public JsonNullable number() { + return number; + } + + /** + * The customer this entity is linked to. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable customer() { + return (JsonNullable) customer; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable currency() { + return (JsonNullable) currency; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + @JsonIgnore + public JsonNullable currencyRate() { + return currencyRate; + } + + /** + * Amounts are including tax + */ + @JsonIgnore + public JsonNullable taxInclusive() { + return taxInclusive; + } + + /** + * Subtotal amount, normally before tax. + */ + @JsonIgnore + public JsonNullable subTotal() { + return subTotal; + } + + /** + * The total amount of the transaction or record + */ + @JsonIgnore + public JsonNullable totalAmount() { + return totalAmount; + } + + /** + * Total tax amount applied to this transaction. + */ + @JsonIgnore + public JsonNullable totalTax() { + return totalTax; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + @JsonIgnore + public JsonNullable transactionDate() { + return transactionDate; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + @JsonIgnore + public JsonNullable paymentMethod() { + return paymentMethod; + } + + /** + * Optional reference message returned by payment method on processing + */ + @JsonIgnore + public JsonNullable paymentMethodReference() { + return paymentMethodReference; + } + + /** + * A unique identifier for an object. + */ + @JsonIgnore + public JsonNullable paymentMethodId() { + return paymentMethodId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable account() { + return (JsonNullable) account; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> lineItems() { + return (Optional>) lineItems; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + @JsonIgnore + public JsonNullable taxCode() { + return taxCode; + } + + /** + * Discount percentage applied to this sales receipt. + */ + @JsonIgnore + public JsonNullable discountPercentage() { + return discountPercentage; + } + + /** + * Discount amount applied to this sales receipt. + */ + @JsonIgnore + public JsonNullable discountAmount() { + return discountAmount; + } + + /** + * Optional note to be associated with the sales receipt. + */ + @JsonIgnore + public JsonNullable note() { + return note; + } + + /** + * Customer memo + */ + @JsonIgnore + public JsonNullable customerMemo() { + return customerMemo; + } + + /** + * Optional reference message for the sales receipt. + */ + @JsonIgnore + public JsonNullable reference() { + return reference; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional

billingAddress() { + return (Optional
) billingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional
shippingAddress() { + return (Optional
) shippingAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable department() { + return (JsonNullable) department; + } + + /** + * A list of linked tracking categories. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> trackingCategories() { + return (JsonNullable>) trackingCategories; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> customFields() { + return (Optional>) customFields; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + @JsonIgnore + public JsonNullable rowVersion() { + return rowVersion; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> passThrough() { + return (Optional>) passThrough; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Reference number for the sales receipt. + */ + public SalesReceiptUpdateInput withNumber(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the sales receipt. + */ + public SalesReceiptUpdateInput withNumber(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + /** + * The customer this entity is linked to. + */ + public SalesReceiptUpdateInput withCustomer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public SalesReceiptUpdateInput withCustomer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public SalesReceiptUpdateInput withCurrency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public SalesReceiptUpdateInput withCurrency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public SalesReceiptUpdateInput withCurrencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public SalesReceiptUpdateInput withCurrencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + /** + * Amounts are including tax + */ + public SalesReceiptUpdateInput withTaxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public SalesReceiptUpdateInput withTaxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public SalesReceiptUpdateInput withSubTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public SalesReceiptUpdateInput withSubTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + /** + * The total amount of the transaction or record + */ + public SalesReceiptUpdateInput withTotalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public SalesReceiptUpdateInput withTotalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public SalesReceiptUpdateInput withTotalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public SalesReceiptUpdateInput withTotalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public SalesReceiptUpdateInput withTransactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public SalesReceiptUpdateInput withTransactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public SalesReceiptUpdateInput withPaymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public SalesReceiptUpdateInput withPaymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public SalesReceiptUpdateInput withPaymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public SalesReceiptUpdateInput withPaymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + /** + * A unique identifier for an object. + */ + public SalesReceiptUpdateInput withPaymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public SalesReceiptUpdateInput withPaymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + public SalesReceiptUpdateInput withAccount(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public SalesReceiptUpdateInput withAccount(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public SalesReceiptUpdateInput withLineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public SalesReceiptUpdateInput withLineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public SalesReceiptUpdateInput withTaxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public SalesReceiptUpdateInput withTaxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public SalesReceiptUpdateInput withDiscountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public SalesReceiptUpdateInput withDiscountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public SalesReceiptUpdateInput withDiscountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public SalesReceiptUpdateInput withDiscountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public SalesReceiptUpdateInput withNote(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public SalesReceiptUpdateInput withNote(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + /** + * Customer memo + */ + public SalesReceiptUpdateInput withCustomerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public SalesReceiptUpdateInput withCustomerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public SalesReceiptUpdateInput withReference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public SalesReceiptUpdateInput withReference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + public SalesReceiptUpdateInput withBillingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + + public SalesReceiptUpdateInput withBillingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + public SalesReceiptUpdateInput withShippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + + public SalesReceiptUpdateInput withShippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + public SalesReceiptUpdateInput withDepartment(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public SalesReceiptUpdateInput withDepartment(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + /** + * A list of linked tracking categories. + */ + public SalesReceiptUpdateInput withTrackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public SalesReceiptUpdateInput withTrackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + public SalesReceiptUpdateInput withCustomFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + + public SalesReceiptUpdateInput withCustomFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public SalesReceiptUpdateInput withRowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public SalesReceiptUpdateInput withRowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public SalesReceiptUpdateInput withPassThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public SalesReceiptUpdateInput withPassThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SalesReceiptUpdateInput other = (SalesReceiptUpdateInput) o; + return + Utils.enhancedDeepEquals(this.number, other.number) && + Utils.enhancedDeepEquals(this.customer, other.customer) && + Utils.enhancedDeepEquals(this.currency, other.currency) && + Utils.enhancedDeepEquals(this.currencyRate, other.currencyRate) && + Utils.enhancedDeepEquals(this.taxInclusive, other.taxInclusive) && + Utils.enhancedDeepEquals(this.subTotal, other.subTotal) && + Utils.enhancedDeepEquals(this.totalAmount, other.totalAmount) && + Utils.enhancedDeepEquals(this.totalTax, other.totalTax) && + Utils.enhancedDeepEquals(this.transactionDate, other.transactionDate) && + Utils.enhancedDeepEquals(this.paymentMethod, other.paymentMethod) && + Utils.enhancedDeepEquals(this.paymentMethodReference, other.paymentMethodReference) && + Utils.enhancedDeepEquals(this.paymentMethodId, other.paymentMethodId) && + Utils.enhancedDeepEquals(this.account, other.account) && + Utils.enhancedDeepEquals(this.lineItems, other.lineItems) && + Utils.enhancedDeepEquals(this.taxCode, other.taxCode) && + Utils.enhancedDeepEquals(this.discountPercentage, other.discountPercentage) && + Utils.enhancedDeepEquals(this.discountAmount, other.discountAmount) && + Utils.enhancedDeepEquals(this.note, other.note) && + Utils.enhancedDeepEquals(this.customerMemo, other.customerMemo) && + Utils.enhancedDeepEquals(this.reference, other.reference) && + Utils.enhancedDeepEquals(this.billingAddress, other.billingAddress) && + Utils.enhancedDeepEquals(this.shippingAddress, other.shippingAddress) && + Utils.enhancedDeepEquals(this.department, other.department) && + Utils.enhancedDeepEquals(this.trackingCategories, other.trackingCategories) && + Utils.enhancedDeepEquals(this.customFields, other.customFields) && + Utils.enhancedDeepEquals(this.rowVersion, other.rowVersion) && + Utils.enhancedDeepEquals(this.passThrough, other.passThrough); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + number, customer, currency, + currencyRate, taxInclusive, subTotal, + totalAmount, totalTax, transactionDate, + paymentMethod, paymentMethodReference, paymentMethodId, + account, lineItems, taxCode, + discountPercentage, discountAmount, note, + customerMemo, reference, billingAddress, + shippingAddress, department, trackingCategories, + customFields, rowVersion, passThrough); + } + + @Override + public String toString() { + return Utils.toString(SalesReceiptUpdateInput.class, + "number", number, + "customer", customer, + "currency", currency, + "currencyRate", currencyRate, + "taxInclusive", taxInclusive, + "subTotal", subTotal, + "totalAmount", totalAmount, + "totalTax", totalTax, + "transactionDate", transactionDate, + "paymentMethod", paymentMethod, + "paymentMethodReference", paymentMethodReference, + "paymentMethodId", paymentMethodId, + "account", account, + "lineItems", lineItems, + "taxCode", taxCode, + "discountPercentage", discountPercentage, + "discountAmount", discountAmount, + "note", note, + "customerMemo", customerMemo, + "reference", reference, + "billingAddress", billingAddress, + "shippingAddress", shippingAddress, + "department", department, + "trackingCategories", trackingCategories, + "customFields", customFields, + "rowVersion", rowVersion, + "passThrough", passThrough); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable number = JsonNullable.undefined(); + + private JsonNullable customer = JsonNullable.undefined(); + + private JsonNullable currency = JsonNullable.undefined(); + + private JsonNullable currencyRate = JsonNullable.undefined(); + + private JsonNullable taxInclusive = JsonNullable.undefined(); + + private JsonNullable subTotal = JsonNullable.undefined(); + + private JsonNullable totalAmount = JsonNullable.undefined(); + + private JsonNullable totalTax = JsonNullable.undefined(); + + private JsonNullable transactionDate = JsonNullable.undefined(); + + private JsonNullable paymentMethod = JsonNullable.undefined(); + + private JsonNullable paymentMethodReference = JsonNullable.undefined(); + + private JsonNullable paymentMethodId = JsonNullable.undefined(); + + private JsonNullable account = JsonNullable.undefined(); + + private Optional> lineItems = Optional.empty(); + + private JsonNullable taxCode = JsonNullable.undefined(); + + private JsonNullable discountPercentage = JsonNullable.undefined(); + + private JsonNullable discountAmount = JsonNullable.undefined(); + + private JsonNullable note = JsonNullable.undefined(); + + private JsonNullable customerMemo = JsonNullable.undefined(); + + private JsonNullable reference = JsonNullable.undefined(); + + private Optional billingAddress = Optional.empty(); + + private Optional shippingAddress = Optional.empty(); + + private JsonNullable department = JsonNullable.undefined(); + + private JsonNullable> trackingCategories = JsonNullable.undefined(); + + private Optional> customFields = Optional.empty(); + + private JsonNullable rowVersion = JsonNullable.undefined(); + + private Optional> passThrough = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * Reference number for the sales receipt. + */ + public Builder number(String number) { + Utils.checkNotNull(number, "number"); + this.number = JsonNullable.of(number); + return this; + } + + /** + * Reference number for the sales receipt. + */ + public Builder number(JsonNullable number) { + Utils.checkNotNull(number, "number"); + this.number = number; + return this; + } + + + /** + * The customer this entity is linked to. + */ + public Builder customer(LinkedCustomerInput customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = JsonNullable.of(customer); + return this; + } + + /** + * The customer this entity is linked to. + */ + public Builder customer(JsonNullable customer) { + Utils.checkNotNull(customer, "customer"); + this.customer = customer; + return this; + } + + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(Currency currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = JsonNullable.of(currency); + return this; + } + + /** + * Indicates the associated currency for an amount of money. Values correspond to [ISO + * 4217](https://en.wikipedia.org/wiki/ISO_4217). + */ + public Builder currency(JsonNullable currency) { + Utils.checkNotNull(currency, "currency"); + this.currency = currency; + return this; + } + + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(double currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = JsonNullable.of(currencyRate); + return this; + } + + /** + * Currency Exchange Rate at the time entity was recorded/generated. + */ + public Builder currencyRate(JsonNullable currencyRate) { + Utils.checkNotNull(currencyRate, "currencyRate"); + this.currencyRate = currencyRate; + return this; + } + + + /** + * Amounts are including tax + */ + public Builder taxInclusive(boolean taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = JsonNullable.of(taxInclusive); + return this; + } + + /** + * Amounts are including tax + */ + public Builder taxInclusive(JsonNullable taxInclusive) { + Utils.checkNotNull(taxInclusive, "taxInclusive"); + this.taxInclusive = taxInclusive; + return this; + } + + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(double subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = JsonNullable.of(subTotal); + return this; + } + + /** + * Subtotal amount, normally before tax. + */ + public Builder subTotal(JsonNullable subTotal) { + Utils.checkNotNull(subTotal, "subTotal"); + this.subTotal = subTotal; + return this; + } + + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(double totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = JsonNullable.of(totalAmount); + return this; + } + + /** + * The total amount of the transaction or record + */ + public Builder totalAmount(JsonNullable totalAmount) { + Utils.checkNotNull(totalAmount, "totalAmount"); + this.totalAmount = totalAmount; + return this; + } + + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(double totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = JsonNullable.of(totalTax); + return this; + } + + /** + * Total tax amount applied to this transaction. + */ + public Builder totalTax(JsonNullable totalTax) { + Utils.checkNotNull(totalTax, "totalTax"); + this.totalTax = totalTax; + return this; + } + + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder transactionDate(OffsetDateTime transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = JsonNullable.of(transactionDate); + return this; + } + + /** + * The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD + */ + public Builder transactionDate(JsonNullable transactionDate) { + Utils.checkNotNull(transactionDate, "transactionDate"); + this.transactionDate = transactionDate; + return this; + } + + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(String paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = JsonNullable.of(paymentMethod); + return this; + } + + /** + * Payment method used for the transaction, such as cash, credit card, bank transfer, or check + */ + public Builder paymentMethod(JsonNullable paymentMethod) { + Utils.checkNotNull(paymentMethod, "paymentMethod"); + this.paymentMethod = paymentMethod; + return this; + } + + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(String paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = JsonNullable.of(paymentMethodReference); + return this; + } + + /** + * Optional reference message returned by payment method on processing + */ + public Builder paymentMethodReference(JsonNullable paymentMethodReference) { + Utils.checkNotNull(paymentMethodReference, "paymentMethodReference"); + this.paymentMethodReference = paymentMethodReference; + return this; + } + + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(String paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = JsonNullable.of(paymentMethodId); + return this; + } + + /** + * A unique identifier for an object. + */ + public Builder paymentMethodId(JsonNullable paymentMethodId) { + Utils.checkNotNull(paymentMethodId, "paymentMethodId"); + this.paymentMethodId = paymentMethodId; + return this; + } + + + public Builder account(LinkedLedgerAccount account) { + Utils.checkNotNull(account, "account"); + this.account = JsonNullable.of(account); + return this; + } + + public Builder account(JsonNullable account) { + Utils.checkNotNull(account, "account"); + this.account = account; + return this; + } + + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public Builder lineItems(List lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = Optional.ofNullable(lineItems); + return this; + } + + /** + * Line items for itemized sales receipts. Used when the sales receipt includes product/service details + * with quantities and pricing. + */ + public Builder lineItems(Optional> lineItems) { + Utils.checkNotNull(lineItems, "lineItems"); + this.lineItems = lineItems; + return this; + } + + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(String taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = JsonNullable.of(taxCode); + return this; + } + + /** + * Applicable tax id/code override if tax is not supplied on a line item basis. + */ + public Builder taxCode(JsonNullable taxCode) { + Utils.checkNotNull(taxCode, "taxCode"); + this.taxCode = taxCode; + return this; + } + + + /** + * Discount percentage applied to this sales receipt. + */ + public Builder discountPercentage(double discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = JsonNullable.of(discountPercentage); + return this; + } + + /** + * Discount percentage applied to this sales receipt. + */ + public Builder discountPercentage(JsonNullable discountPercentage) { + Utils.checkNotNull(discountPercentage, "discountPercentage"); + this.discountPercentage = discountPercentage; + return this; + } + + + /** + * Discount amount applied to this sales receipt. + */ + public Builder discountAmount(double discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = JsonNullable.of(discountAmount); + return this; + } + + /** + * Discount amount applied to this sales receipt. + */ + public Builder discountAmount(JsonNullable discountAmount) { + Utils.checkNotNull(discountAmount, "discountAmount"); + this.discountAmount = discountAmount; + return this; + } + + + /** + * Optional note to be associated with the sales receipt. + */ + public Builder note(String note) { + Utils.checkNotNull(note, "note"); + this.note = JsonNullable.of(note); + return this; + } + + /** + * Optional note to be associated with the sales receipt. + */ + public Builder note(JsonNullable note) { + Utils.checkNotNull(note, "note"); + this.note = note; + return this; + } + + + /** + * Customer memo + */ + public Builder customerMemo(String customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = JsonNullable.of(customerMemo); + return this; + } + + /** + * Customer memo + */ + public Builder customerMemo(JsonNullable customerMemo) { + Utils.checkNotNull(customerMemo, "customerMemo"); + this.customerMemo = customerMemo; + return this; + } + + + /** + * Optional reference message for the sales receipt. + */ + public Builder reference(String reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = JsonNullable.of(reference); + return this; + } + + /** + * Optional reference message for the sales receipt. + */ + public Builder reference(JsonNullable reference) { + Utils.checkNotNull(reference, "reference"); + this.reference = reference; + return this; + } + + + public Builder billingAddress(Address billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = Optional.ofNullable(billingAddress); + return this; + } + + public Builder billingAddress(Optional billingAddress) { + Utils.checkNotNull(billingAddress, "billingAddress"); + this.billingAddress = billingAddress; + return this; + } + + + public Builder shippingAddress(Address shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = Optional.ofNullable(shippingAddress); + return this; + } + + public Builder shippingAddress(Optional shippingAddress) { + Utils.checkNotNull(shippingAddress, "shippingAddress"); + this.shippingAddress = shippingAddress; + return this; + } + + + public Builder department(LinkedDepartmentInput department) { + Utils.checkNotNull(department, "department"); + this.department = JsonNullable.of(department); + return this; + } + + public Builder department(JsonNullable department) { + Utils.checkNotNull(department, "department"); + this.department = department; + return this; + } + + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(List trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = JsonNullable.of(trackingCategories); + return this; + } + + /** + * A list of linked tracking categories. + */ + public Builder trackingCategories(JsonNullable> trackingCategories) { + Utils.checkNotNull(trackingCategories, "trackingCategories"); + this.trackingCategories = trackingCategories; + return this; + } + + + public Builder customFields(List customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = Optional.ofNullable(customFields); + return this; + } + + public Builder customFields(Optional> customFields) { + Utils.checkNotNull(customFields, "customFields"); + this.customFields = customFields; + return this; + } + + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(String rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = JsonNullable.of(rowVersion); + return this; + } + + /** + * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each + * time an update is made to the object. + */ + public Builder rowVersion(JsonNullable rowVersion) { + Utils.checkNotNull(rowVersion, "rowVersion"); + this.rowVersion = rowVersion; + return this; + } + + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(List passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = Optional.ofNullable(passThrough); + return this; + } + + /** + * The pass_through property allows passing service-specific, custom data or structured modifications + * in request body when creating or updating resources. + */ + public Builder passThrough(Optional> passThrough) { + Utils.checkNotNull(passThrough, "passThrough"); + this.passThrough = passThrough; + return this; + } + + public SalesReceiptUpdateInput build() { + + return new SalesReceiptUpdateInput( + number, customer, currency, + currencyRate, taxInclusive, subTotal, + totalAmount, totalTax, transactionDate, + paymentMethod, paymentMethodReference, paymentMethodId, + account, lineItems, taxCode, + discountPercentage, discountAmount, note, + customerMemo, reference, billingAddress, + shippingAddress, department, trackingCategories, + customFields, rowVersion, passThrough); + } + + } +} diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingBillPaymentsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingBillPaymentsUpdateRequest.java index 5523fddbb..20b193b24 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingBillPaymentsUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingBillPaymentsUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.BillPaymentInput; +import com.apideck.unify.models.components.BillPaymentUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -50,7 +50,7 @@ public class AccountingBillPaymentsUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private BillPaymentInput billPayment; + private BillPaymentUpdateInput billPaymentUpdateInput; @JsonCreator public AccountingBillPaymentsUpdateRequest( @@ -59,26 +59,26 @@ public AccountingBillPaymentsUpdateRequest( Optional appId, Optional serviceId, Optional raw, - BillPaymentInput billPayment) { + BillPaymentUpdateInput billPaymentUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(billPayment, "billPayment"); + Utils.checkNotNull(billPaymentUpdateInput, "billPaymentUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; - this.billPayment = billPayment; + this.billPaymentUpdateInput = billPaymentUpdateInput; } public AccountingBillPaymentsUpdateRequest( String id, - BillPaymentInput billPayment) { + BillPaymentUpdateInput billPaymentUpdateInput) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), billPayment); + Optional.empty(), Optional.empty(), billPaymentUpdateInput); } /** @@ -123,8 +123,8 @@ public Optional raw() { } @JsonIgnore - public BillPaymentInput billPayment() { - return billPayment; + public BillPaymentUpdateInput billPaymentUpdateInput() { + return billPaymentUpdateInput; } public static Builder builder() { @@ -219,9 +219,9 @@ public AccountingBillPaymentsUpdateRequest withRaw(Optional raw) { return this; } - public AccountingBillPaymentsUpdateRequest withBillPayment(BillPaymentInput billPayment) { - Utils.checkNotNull(billPayment, "billPayment"); - this.billPayment = billPayment; + public AccountingBillPaymentsUpdateRequest withBillPaymentUpdateInput(BillPaymentUpdateInput billPaymentUpdateInput) { + Utils.checkNotNull(billPaymentUpdateInput, "billPaymentUpdateInput"); + this.billPaymentUpdateInput = billPaymentUpdateInput; return this; } @@ -240,14 +240,14 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.billPayment, other.billPayment); + Utils.enhancedDeepEquals(this.billPaymentUpdateInput, other.billPaymentUpdateInput); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, raw, billPayment); + serviceId, raw, billPaymentUpdateInput); } @Override @@ -258,7 +258,7 @@ public String toString() { "appId", appId, "serviceId", serviceId, "raw", raw, - "billPayment", billPayment); + "billPaymentUpdateInput", billPaymentUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -274,7 +274,7 @@ public final static class Builder { private Optional raw; - private BillPaymentInput billPayment; + private BillPaymentUpdateInput billPaymentUpdateInput; private Builder() { // force use of static builder() method @@ -369,9 +369,9 @@ public Builder raw(Optional raw) { } - public Builder billPayment(BillPaymentInput billPayment) { - Utils.checkNotNull(billPayment, "billPayment"); - this.billPayment = billPayment; + public Builder billPaymentUpdateInput(BillPaymentUpdateInput billPaymentUpdateInput) { + Utils.checkNotNull(billPaymentUpdateInput, "billPaymentUpdateInput"); + this.billPaymentUpdateInput = billPaymentUpdateInput; return this; } @@ -382,7 +382,7 @@ public AccountingBillPaymentsUpdateRequest build() { return new AccountingBillPaymentsUpdateRequest( id, consumerId, appId, - serviceId, raw, billPayment); + serviceId, raw, billPaymentUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingCreditNotesUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingCreditNotesUpdateRequest.java index f652249be..e98df55eb 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingCreditNotesUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingCreditNotesUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.CreditNoteInput; +import com.apideck.unify.models.components.CreditNoteUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -50,7 +50,7 @@ public class AccountingCreditNotesUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private CreditNoteInput creditNote; + private CreditNoteUpdateInput creditNoteUpdateInput; @JsonCreator public AccountingCreditNotesUpdateRequest( @@ -59,26 +59,26 @@ public AccountingCreditNotesUpdateRequest( Optional appId, Optional serviceId, Optional raw, - CreditNoteInput creditNote) { + CreditNoteUpdateInput creditNoteUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(creditNote, "creditNote"); + Utils.checkNotNull(creditNoteUpdateInput, "creditNoteUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; - this.creditNote = creditNote; + this.creditNoteUpdateInput = creditNoteUpdateInput; } public AccountingCreditNotesUpdateRequest( String id, - CreditNoteInput creditNote) { + CreditNoteUpdateInput creditNoteUpdateInput) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), creditNote); + Optional.empty(), Optional.empty(), creditNoteUpdateInput); } /** @@ -123,8 +123,8 @@ public Optional raw() { } @JsonIgnore - public CreditNoteInput creditNote() { - return creditNote; + public CreditNoteUpdateInput creditNoteUpdateInput() { + return creditNoteUpdateInput; } public static Builder builder() { @@ -219,9 +219,9 @@ public AccountingCreditNotesUpdateRequest withRaw(Optional raw) { return this; } - public AccountingCreditNotesUpdateRequest withCreditNote(CreditNoteInput creditNote) { - Utils.checkNotNull(creditNote, "creditNote"); - this.creditNote = creditNote; + public AccountingCreditNotesUpdateRequest withCreditNoteUpdateInput(CreditNoteUpdateInput creditNoteUpdateInput) { + Utils.checkNotNull(creditNoteUpdateInput, "creditNoteUpdateInput"); + this.creditNoteUpdateInput = creditNoteUpdateInput; return this; } @@ -240,14 +240,14 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.creditNote, other.creditNote); + Utils.enhancedDeepEquals(this.creditNoteUpdateInput, other.creditNoteUpdateInput); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, raw, creditNote); + serviceId, raw, creditNoteUpdateInput); } @Override @@ -258,7 +258,7 @@ public String toString() { "appId", appId, "serviceId", serviceId, "raw", raw, - "creditNote", creditNote); + "creditNoteUpdateInput", creditNoteUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -274,7 +274,7 @@ public final static class Builder { private Optional raw; - private CreditNoteInput creditNote; + private CreditNoteUpdateInput creditNoteUpdateInput; private Builder() { // force use of static builder() method @@ -369,9 +369,9 @@ public Builder raw(Optional raw) { } - public Builder creditNote(CreditNoteInput creditNote) { - Utils.checkNotNull(creditNote, "creditNote"); - this.creditNote = creditNote; + public Builder creditNoteUpdateInput(CreditNoteUpdateInput creditNoteUpdateInput) { + Utils.checkNotNull(creditNoteUpdateInput, "creditNoteUpdateInput"); + this.creditNoteUpdateInput = creditNoteUpdateInput; return this; } @@ -382,7 +382,7 @@ public AccountingCreditNotesUpdateRequest build() { return new AccountingCreditNotesUpdateRequest( id, consumerId, appId, - serviceId, raw, creditNote); + serviceId, raw, creditNoteUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingExpenseCategoriesUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingExpenseCategoriesUpdateRequest.java index 9a3155ad2..fbd5bfe75 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingExpenseCategoriesUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingExpenseCategoriesUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.ExpenseCategoryInput; +import com.apideck.unify.models.components.ExpenseCategoryUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -50,7 +50,7 @@ public class AccountingExpenseCategoriesUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private ExpenseCategoryInput expenseCategory; + private ExpenseCategoryUpdateInput expenseCategoryUpdateInput; @JsonCreator public AccountingExpenseCategoriesUpdateRequest( @@ -59,26 +59,26 @@ public AccountingExpenseCategoriesUpdateRequest( Optional appId, Optional serviceId, Optional raw, - ExpenseCategoryInput expenseCategory) { + ExpenseCategoryUpdateInput expenseCategoryUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(expenseCategory, "expenseCategory"); + Utils.checkNotNull(expenseCategoryUpdateInput, "expenseCategoryUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; - this.expenseCategory = expenseCategory; + this.expenseCategoryUpdateInput = expenseCategoryUpdateInput; } public AccountingExpenseCategoriesUpdateRequest( String id, - ExpenseCategoryInput expenseCategory) { + ExpenseCategoryUpdateInput expenseCategoryUpdateInput) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), expenseCategory); + Optional.empty(), Optional.empty(), expenseCategoryUpdateInput); } /** @@ -123,8 +123,8 @@ public Optional raw() { } @JsonIgnore - public ExpenseCategoryInput expenseCategory() { - return expenseCategory; + public ExpenseCategoryUpdateInput expenseCategoryUpdateInput() { + return expenseCategoryUpdateInput; } public static Builder builder() { @@ -219,9 +219,9 @@ public AccountingExpenseCategoriesUpdateRequest withRaw(Optional raw) { return this; } - public AccountingExpenseCategoriesUpdateRequest withExpenseCategory(ExpenseCategoryInput expenseCategory) { - Utils.checkNotNull(expenseCategory, "expenseCategory"); - this.expenseCategory = expenseCategory; + public AccountingExpenseCategoriesUpdateRequest withExpenseCategoryUpdateInput(ExpenseCategoryUpdateInput expenseCategoryUpdateInput) { + Utils.checkNotNull(expenseCategoryUpdateInput, "expenseCategoryUpdateInput"); + this.expenseCategoryUpdateInput = expenseCategoryUpdateInput; return this; } @@ -240,14 +240,14 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.expenseCategory, other.expenseCategory); + Utils.enhancedDeepEquals(this.expenseCategoryUpdateInput, other.expenseCategoryUpdateInput); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, raw, expenseCategory); + serviceId, raw, expenseCategoryUpdateInput); } @Override @@ -258,7 +258,7 @@ public String toString() { "appId", appId, "serviceId", serviceId, "raw", raw, - "expenseCategory", expenseCategory); + "expenseCategoryUpdateInput", expenseCategoryUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -274,7 +274,7 @@ public final static class Builder { private Optional raw; - private ExpenseCategoryInput expenseCategory; + private ExpenseCategoryUpdateInput expenseCategoryUpdateInput; private Builder() { // force use of static builder() method @@ -369,9 +369,9 @@ public Builder raw(Optional raw) { } - public Builder expenseCategory(ExpenseCategoryInput expenseCategory) { - Utils.checkNotNull(expenseCategory, "expenseCategory"); - this.expenseCategory = expenseCategory; + public Builder expenseCategoryUpdateInput(ExpenseCategoryUpdateInput expenseCategoryUpdateInput) { + Utils.checkNotNull(expenseCategoryUpdateInput, "expenseCategoryUpdateInput"); + this.expenseCategoryUpdateInput = expenseCategoryUpdateInput; return this; } @@ -382,7 +382,7 @@ public AccountingExpenseCategoriesUpdateRequest build() { return new AccountingExpenseCategoriesUpdateRequest( id, consumerId, appId, - serviceId, raw, expenseCategory); + serviceId, raw, expenseCategoryUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingExpenseReportsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingExpenseReportsUpdateRequest.java index 03034ba9a..5e29df43f 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingExpenseReportsUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingExpenseReportsUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.ExpenseReportInput; +import com.apideck.unify.models.components.ExpenseReportUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -50,7 +50,7 @@ public class AccountingExpenseReportsUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private ExpenseReportInput expenseReport; + private ExpenseReportUpdateInput expenseReportUpdateInput; @JsonCreator public AccountingExpenseReportsUpdateRequest( @@ -59,26 +59,26 @@ public AccountingExpenseReportsUpdateRequest( Optional appId, Optional serviceId, Optional raw, - ExpenseReportInput expenseReport) { + ExpenseReportUpdateInput expenseReportUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(expenseReport, "expenseReport"); + Utils.checkNotNull(expenseReportUpdateInput, "expenseReportUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; - this.expenseReport = expenseReport; + this.expenseReportUpdateInput = expenseReportUpdateInput; } public AccountingExpenseReportsUpdateRequest( String id, - ExpenseReportInput expenseReport) { + ExpenseReportUpdateInput expenseReportUpdateInput) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), expenseReport); + Optional.empty(), Optional.empty(), expenseReportUpdateInput); } /** @@ -123,8 +123,8 @@ public Optional raw() { } @JsonIgnore - public ExpenseReportInput expenseReport() { - return expenseReport; + public ExpenseReportUpdateInput expenseReportUpdateInput() { + return expenseReportUpdateInput; } public static Builder builder() { @@ -219,9 +219,9 @@ public AccountingExpenseReportsUpdateRequest withRaw(Optional raw) { return this; } - public AccountingExpenseReportsUpdateRequest withExpenseReport(ExpenseReportInput expenseReport) { - Utils.checkNotNull(expenseReport, "expenseReport"); - this.expenseReport = expenseReport; + public AccountingExpenseReportsUpdateRequest withExpenseReportUpdateInput(ExpenseReportUpdateInput expenseReportUpdateInput) { + Utils.checkNotNull(expenseReportUpdateInput, "expenseReportUpdateInput"); + this.expenseReportUpdateInput = expenseReportUpdateInput; return this; } @@ -240,14 +240,14 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.expenseReport, other.expenseReport); + Utils.enhancedDeepEquals(this.expenseReportUpdateInput, other.expenseReportUpdateInput); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, raw, expenseReport); + serviceId, raw, expenseReportUpdateInput); } @Override @@ -258,7 +258,7 @@ public String toString() { "appId", appId, "serviceId", serviceId, "raw", raw, - "expenseReport", expenseReport); + "expenseReportUpdateInput", expenseReportUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -274,7 +274,7 @@ public final static class Builder { private Optional raw; - private ExpenseReportInput expenseReport; + private ExpenseReportUpdateInput expenseReportUpdateInput; private Builder() { // force use of static builder() method @@ -369,9 +369,9 @@ public Builder raw(Optional raw) { } - public Builder expenseReport(ExpenseReportInput expenseReport) { - Utils.checkNotNull(expenseReport, "expenseReport"); - this.expenseReport = expenseReport; + public Builder expenseReportUpdateInput(ExpenseReportUpdateInput expenseReportUpdateInput) { + Utils.checkNotNull(expenseReportUpdateInput, "expenseReportUpdateInput"); + this.expenseReportUpdateInput = expenseReportUpdateInput; return this; } @@ -382,7 +382,7 @@ public AccountingExpenseReportsUpdateRequest build() { return new AccountingExpenseReportsUpdateRequest( id, consumerId, appId, - serviceId, raw, expenseReport); + serviceId, raw, expenseReportUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingExpensesUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingExpensesUpdateRequest.java index c5e3b8ec8..d701d6384 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingExpensesUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingExpensesUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.ExpenseInput; +import com.apideck.unify.models.components.ExpenseUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -50,7 +50,7 @@ public class AccountingExpensesUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private ExpenseInput expense; + private ExpenseUpdateInput expenseUpdateInput; @JsonCreator public AccountingExpensesUpdateRequest( @@ -59,26 +59,26 @@ public AccountingExpensesUpdateRequest( Optional appId, Optional serviceId, Optional raw, - ExpenseInput expense) { + ExpenseUpdateInput expenseUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(expense, "expense"); + Utils.checkNotNull(expenseUpdateInput, "expenseUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; - this.expense = expense; + this.expenseUpdateInput = expenseUpdateInput; } public AccountingExpensesUpdateRequest( String id, - ExpenseInput expense) { + ExpenseUpdateInput expenseUpdateInput) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), expense); + Optional.empty(), Optional.empty(), expenseUpdateInput); } /** @@ -123,8 +123,8 @@ public Optional raw() { } @JsonIgnore - public ExpenseInput expense() { - return expense; + public ExpenseUpdateInput expenseUpdateInput() { + return expenseUpdateInput; } public static Builder builder() { @@ -219,9 +219,9 @@ public AccountingExpensesUpdateRequest withRaw(Optional raw) { return this; } - public AccountingExpensesUpdateRequest withExpense(ExpenseInput expense) { - Utils.checkNotNull(expense, "expense"); - this.expense = expense; + public AccountingExpensesUpdateRequest withExpenseUpdateInput(ExpenseUpdateInput expenseUpdateInput) { + Utils.checkNotNull(expenseUpdateInput, "expenseUpdateInput"); + this.expenseUpdateInput = expenseUpdateInput; return this; } @@ -240,14 +240,14 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.expense, other.expense); + Utils.enhancedDeepEquals(this.expenseUpdateInput, other.expenseUpdateInput); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, raw, expense); + serviceId, raw, expenseUpdateInput); } @Override @@ -258,7 +258,7 @@ public String toString() { "appId", appId, "serviceId", serviceId, "raw", raw, - "expense", expense); + "expenseUpdateInput", expenseUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -274,7 +274,7 @@ public final static class Builder { private Optional raw; - private ExpenseInput expense; + private ExpenseUpdateInput expenseUpdateInput; private Builder() { // force use of static builder() method @@ -369,9 +369,9 @@ public Builder raw(Optional raw) { } - public Builder expense(ExpenseInput expense) { - Utils.checkNotNull(expense, "expense"); - this.expense = expense; + public Builder expenseUpdateInput(ExpenseUpdateInput expenseUpdateInput) { + Utils.checkNotNull(expenseUpdateInput, "expenseUpdateInput"); + this.expenseUpdateInput = expenseUpdateInput; return this; } @@ -382,7 +382,7 @@ public AccountingExpensesUpdateRequest build() { return new AccountingExpensesUpdateRequest( id, consumerId, appId, - serviceId, raw, expense); + serviceId, raw, expenseUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentsUpdateRequest.java index ed3806da6..d36c2403f 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingPaymentsUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingPaymentsUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.PaymentInput; +import com.apideck.unify.models.components.PaymentUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -57,7 +57,7 @@ public class AccountingPaymentsUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private PaymentInput payment; + private PaymentUpdateInput paymentUpdateInput; @JsonCreator public AccountingPaymentsUpdateRequest( @@ -67,29 +67,29 @@ public AccountingPaymentsUpdateRequest( Optional serviceId, Optional companyId, Optional raw, - PaymentInput payment) { + PaymentUpdateInput paymentUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(companyId, "companyId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(payment, "payment"); + Utils.checkNotNull(paymentUpdateInput, "paymentUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.companyId = companyId; this.raw = raw; - this.payment = payment; + this.paymentUpdateInput = paymentUpdateInput; } public AccountingPaymentsUpdateRequest( String id, - PaymentInput payment) { + PaymentUpdateInput paymentUpdateInput) { this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - payment); + paymentUpdateInput); } /** @@ -143,8 +143,8 @@ public Optional raw() { } @JsonIgnore - public PaymentInput payment() { - return payment; + public PaymentUpdateInput paymentUpdateInput() { + return paymentUpdateInput; } public static Builder builder() { @@ -260,9 +260,9 @@ public AccountingPaymentsUpdateRequest withRaw(Optional raw) { return this; } - public AccountingPaymentsUpdateRequest withPayment(PaymentInput payment) { - Utils.checkNotNull(payment, "payment"); - this.payment = payment; + public AccountingPaymentsUpdateRequest withPaymentUpdateInput(PaymentUpdateInput paymentUpdateInput) { + Utils.checkNotNull(paymentUpdateInput, "paymentUpdateInput"); + this.paymentUpdateInput = paymentUpdateInput; return this; } @@ -282,7 +282,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.companyId, other.companyId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.payment, other.payment); + Utils.enhancedDeepEquals(this.paymentUpdateInput, other.paymentUpdateInput); } @Override @@ -290,7 +290,7 @@ public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, serviceId, companyId, raw, - payment); + paymentUpdateInput); } @Override @@ -302,7 +302,7 @@ public String toString() { "serviceId", serviceId, "companyId", companyId, "raw", raw, - "payment", payment); + "paymentUpdateInput", paymentUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -320,7 +320,7 @@ public final static class Builder { private Optional raw; - private PaymentInput payment; + private PaymentUpdateInput paymentUpdateInput; private Builder() { // force use of static builder() method @@ -436,9 +436,9 @@ public Builder raw(Optional raw) { } - public Builder payment(PaymentInput payment) { - Utils.checkNotNull(payment, "payment"); - this.payment = payment; + public Builder paymentUpdateInput(PaymentUpdateInput paymentUpdateInput) { + Utils.checkNotNull(paymentUpdateInput, "paymentUpdateInput"); + this.paymentUpdateInput = paymentUpdateInput; return this; } @@ -450,7 +450,7 @@ public AccountingPaymentsUpdateRequest build() { return new AccountingPaymentsUpdateRequest( id, consumerId, appId, serviceId, companyId, raw, - payment); + paymentUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingProjectsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingProjectsUpdateRequest.java index 7e3bb96ae..a8bbf2756 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingProjectsUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingProjectsUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.ProjectInput; +import com.apideck.unify.models.components.ProjectUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -57,7 +57,7 @@ public class AccountingProjectsUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private ProjectInput project; + private ProjectUpdateInput projectUpdateInput; @JsonCreator public AccountingProjectsUpdateRequest( @@ -67,29 +67,29 @@ public AccountingProjectsUpdateRequest( Optional serviceId, Optional companyId, Optional raw, - ProjectInput project) { + ProjectUpdateInput projectUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(companyId, "companyId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(project, "project"); + Utils.checkNotNull(projectUpdateInput, "projectUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.companyId = companyId; this.raw = raw; - this.project = project; + this.projectUpdateInput = projectUpdateInput; } public AccountingProjectsUpdateRequest( String id, - ProjectInput project) { + ProjectUpdateInput projectUpdateInput) { this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - project); + projectUpdateInput); } /** @@ -143,8 +143,8 @@ public Optional raw() { } @JsonIgnore - public ProjectInput project() { - return project; + public ProjectUpdateInput projectUpdateInput() { + return projectUpdateInput; } public static Builder builder() { @@ -260,9 +260,9 @@ public AccountingProjectsUpdateRequest withRaw(Optional raw) { return this; } - public AccountingProjectsUpdateRequest withProject(ProjectInput project) { - Utils.checkNotNull(project, "project"); - this.project = project; + public AccountingProjectsUpdateRequest withProjectUpdateInput(ProjectUpdateInput projectUpdateInput) { + Utils.checkNotNull(projectUpdateInput, "projectUpdateInput"); + this.projectUpdateInput = projectUpdateInput; return this; } @@ -282,7 +282,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.companyId, other.companyId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.project, other.project); + Utils.enhancedDeepEquals(this.projectUpdateInput, other.projectUpdateInput); } @Override @@ -290,7 +290,7 @@ public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, serviceId, companyId, raw, - project); + projectUpdateInput); } @Override @@ -302,7 +302,7 @@ public String toString() { "serviceId", serviceId, "companyId", companyId, "raw", raw, - "project", project); + "projectUpdateInput", projectUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -320,7 +320,7 @@ public final static class Builder { private Optional raw; - private ProjectInput project; + private ProjectUpdateInput projectUpdateInput; private Builder() { // force use of static builder() method @@ -436,9 +436,9 @@ public Builder raw(Optional raw) { } - public Builder project(ProjectInput project) { - Utils.checkNotNull(project, "project"); - this.project = project; + public Builder projectUpdateInput(ProjectUpdateInput projectUpdateInput) { + Utils.checkNotNull(projectUpdateInput, "projectUpdateInput"); + this.projectUpdateInput = projectUpdateInput; return this; } @@ -450,7 +450,7 @@ public AccountingProjectsUpdateRequest build() { return new AccountingProjectsUpdateRequest( id, consumerId, appId, serviceId, companyId, raw, - project); + projectUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingRefundsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingRefundsUpdateRequest.java index e4a849f7d..a0b6522b5 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingRefundsUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingRefundsUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.RefundInput; +import com.apideck.unify.models.components.RefundUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -50,7 +50,7 @@ public class AccountingRefundsUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private RefundInput refund; + private RefundUpdateInput refundUpdateInput; @JsonCreator public AccountingRefundsUpdateRequest( @@ -59,26 +59,26 @@ public AccountingRefundsUpdateRequest( Optional appId, Optional serviceId, Optional raw, - RefundInput refund) { + RefundUpdateInput refundUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); - Utils.checkNotNull(refund, "refund"); + Utils.checkNotNull(refundUpdateInput, "refundUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; - this.refund = refund; + this.refundUpdateInput = refundUpdateInput; } public AccountingRefundsUpdateRequest( String id, - RefundInput refund) { + RefundUpdateInput refundUpdateInput) { this(id, Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty(), refund); + Optional.empty(), Optional.empty(), refundUpdateInput); } /** @@ -123,8 +123,8 @@ public Optional raw() { } @JsonIgnore - public RefundInput refund() { - return refund; + public RefundUpdateInput refundUpdateInput() { + return refundUpdateInput; } public static Builder builder() { @@ -219,9 +219,9 @@ public AccountingRefundsUpdateRequest withRaw(Optional raw) { return this; } - public AccountingRefundsUpdateRequest withRefund(RefundInput refund) { - Utils.checkNotNull(refund, "refund"); - this.refund = refund; + public AccountingRefundsUpdateRequest withRefundUpdateInput(RefundUpdateInput refundUpdateInput) { + Utils.checkNotNull(refundUpdateInput, "refundUpdateInput"); + this.refundUpdateInput = refundUpdateInput; return this; } @@ -240,14 +240,14 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.appId, other.appId) && Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && - Utils.enhancedDeepEquals(this.refund, other.refund); + Utils.enhancedDeepEquals(this.refundUpdateInput, other.refundUpdateInput); } @Override public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, - serviceId, raw, refund); + serviceId, raw, refundUpdateInput); } @Override @@ -258,7 +258,7 @@ public String toString() { "appId", appId, "serviceId", serviceId, "raw", raw, - "refund", refund); + "refundUpdateInput", refundUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -274,7 +274,7 @@ public final static class Builder { private Optional raw; - private RefundInput refund; + private RefundUpdateInput refundUpdateInput; private Builder() { // force use of static builder() method @@ -369,9 +369,9 @@ public Builder raw(Optional raw) { } - public Builder refund(RefundInput refund) { - Utils.checkNotNull(refund, "refund"); - this.refund = refund; + public Builder refundUpdateInput(RefundUpdateInput refundUpdateInput) { + Utils.checkNotNull(refundUpdateInput, "refundUpdateInput"); + this.refundUpdateInput = refundUpdateInput; return this; } @@ -382,7 +382,7 @@ public AccountingRefundsUpdateRequest build() { return new AccountingRefundsUpdateRequest( id, consumerId, appId, - serviceId, raw, refund); + serviceId, raw, refundUpdateInput); } diff --git a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java index 3c3101112..41d0e1f56 100644 --- a/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java +++ b/src/main/java/com/apideck/unify/models/operations/AccountingSalesReceiptsUpdateRequest.java @@ -3,7 +3,7 @@ */ package com.apideck.unify.models.operations; -import com.apideck.unify.models.components.SalesReceiptInput; +import com.apideck.unify.models.components.SalesReceiptUpdateInput; import com.apideck.unify.utils.LazySingletonValue; import com.apideck.unify.utils.SpeakeasyMetadata; import com.apideck.unify.utils.Utils; @@ -57,7 +57,7 @@ public class AccountingSalesReceiptsUpdateRequest { @SpeakeasyMetadata("request:mediaType=application/json") - private SalesReceiptInput salesReceipt; + private SalesReceiptUpdateInput salesReceiptUpdateInput; @JsonCreator public AccountingSalesReceiptsUpdateRequest( @@ -67,29 +67,29 @@ public AccountingSalesReceiptsUpdateRequest( Optional serviceId, Optional raw, Optional companyId, - SalesReceiptInput salesReceipt) { + SalesReceiptUpdateInput salesReceiptUpdateInput) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(consumerId, "consumerId"); Utils.checkNotNull(appId, "appId"); Utils.checkNotNull(serviceId, "serviceId"); Utils.checkNotNull(raw, "raw"); Utils.checkNotNull(companyId, "companyId"); - Utils.checkNotNull(salesReceipt, "salesReceipt"); + Utils.checkNotNull(salesReceiptUpdateInput, "salesReceiptUpdateInput"); this.id = id; this.consumerId = consumerId; this.appId = appId; this.serviceId = serviceId; this.raw = raw; this.companyId = companyId; - this.salesReceipt = salesReceipt; + this.salesReceiptUpdateInput = salesReceiptUpdateInput; } public AccountingSalesReceiptsUpdateRequest( String id, - SalesReceiptInput salesReceipt) { + SalesReceiptUpdateInput salesReceiptUpdateInput) { this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), - salesReceipt); + salesReceiptUpdateInput); } /** @@ -143,8 +143,8 @@ public Optional companyId() { } @JsonIgnore - public SalesReceiptInput salesReceipt() { - return salesReceipt; + public SalesReceiptUpdateInput salesReceiptUpdateInput() { + return salesReceiptUpdateInput; } public static Builder builder() { @@ -260,9 +260,9 @@ public AccountingSalesReceiptsUpdateRequest withCompanyId(Optional compa return this; } - public AccountingSalesReceiptsUpdateRequest withSalesReceipt(SalesReceiptInput salesReceipt) { - Utils.checkNotNull(salesReceipt, "salesReceipt"); - this.salesReceipt = salesReceipt; + public AccountingSalesReceiptsUpdateRequest withSalesReceiptUpdateInput(SalesReceiptUpdateInput salesReceiptUpdateInput) { + Utils.checkNotNull(salesReceiptUpdateInput, "salesReceiptUpdateInput"); + this.salesReceiptUpdateInput = salesReceiptUpdateInput; return this; } @@ -282,7 +282,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.serviceId, other.serviceId) && Utils.enhancedDeepEquals(this.raw, other.raw) && Utils.enhancedDeepEquals(this.companyId, other.companyId) && - Utils.enhancedDeepEquals(this.salesReceipt, other.salesReceipt); + Utils.enhancedDeepEquals(this.salesReceiptUpdateInput, other.salesReceiptUpdateInput); } @Override @@ -290,7 +290,7 @@ public int hashCode() { return Utils.enhancedHash( id, consumerId, appId, serviceId, raw, companyId, - salesReceipt); + salesReceiptUpdateInput); } @Override @@ -302,7 +302,7 @@ public String toString() { "serviceId", serviceId, "raw", raw, "companyId", companyId, - "salesReceipt", salesReceipt); + "salesReceiptUpdateInput", salesReceiptUpdateInput); } @SuppressWarnings("UnusedReturnValue") @@ -320,7 +320,7 @@ public final static class Builder { private Optional companyId = Optional.empty(); - private SalesReceiptInput salesReceipt; + private SalesReceiptUpdateInput salesReceiptUpdateInput; private Builder() { // force use of static builder() method @@ -436,9 +436,9 @@ public Builder companyId(Optional companyId) { } - public Builder salesReceipt(SalesReceiptInput salesReceipt) { - Utils.checkNotNull(salesReceipt, "salesReceipt"); - this.salesReceipt = salesReceipt; + public Builder salesReceiptUpdateInput(SalesReceiptUpdateInput salesReceiptUpdateInput) { + Utils.checkNotNull(salesReceiptUpdateInput, "salesReceiptUpdateInput"); + this.salesReceiptUpdateInput = salesReceiptUpdateInput; return this; } @@ -450,7 +450,7 @@ public AccountingSalesReceiptsUpdateRequest build() { return new AccountingSalesReceiptsUpdateRequest( id, consumerId, appId, serviceId, raw, companyId, - salesReceipt); + salesReceiptUpdateInput); } diff --git a/src/main/java/com/apideck/unify/operations/AccountingBillPaymentsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingBillPaymentsUpdate.java index 03c9a6759..6d09c5ad4 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingBillPaymentsUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingBillPaymentsUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "billPayment", + "billPaymentUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingCreditNotesUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingCreditNotesUpdate.java index 60aba7502..ec831e72d 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingCreditNotesUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingCreditNotesUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "creditNote", + "creditNoteUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingExpenseCategoriesUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingExpenseCategoriesUpdate.java index 30b27ad29..603f5b294 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingExpenseCategoriesUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingExpenseCategoriesUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "expenseCategory", + "expenseCategoryUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingExpenseReportsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingExpenseReportsUpdate.java index aafca79ef..df6d998b6 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingExpenseReportsUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingExpenseReportsUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "expenseReport", + "expenseReportUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingExpensesUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingExpensesUpdate.java index fe47b2051..97a2654e2 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingExpensesUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingExpensesUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "expense", + "expenseUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingPaymentsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingPaymentsUpdate.java index 9f786d3f8..140b96af3 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingPaymentsUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingPaymentsUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "payment", + "paymentUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingProjectsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingProjectsUpdate.java index 4760e966e..5c58cd251 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingProjectsUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingProjectsUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "project", + "projectUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingRefundsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingRefundsUpdate.java index 1b685d59c..7a52c8015 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingRefundsUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingRefundsUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "refund", + "refundUpdateInput", "json", false); if (serializedRequestBody == null) { diff --git a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java index 3edf9a5bb..ea5a1378a 100644 --- a/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java +++ b/src/main/java/com/apideck/unify/operations/AccountingSalesReceiptsUpdate.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR typeReference); SerializedBody serializedRequestBody = Utils.serializeRequestBody( convertedRequest, - "salesReceipt", + "salesReceiptUpdateInput", "json", false); if (serializedRequestBody == null) { From e7c657baefd72b14e55b46b5311069331e62768c Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2026 16:11:43 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow