diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fd8e89b23..e4985add3 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 38254260-287a-40b6-9ac5-c2fcb654c9cc management: - docChecksum: fbc79de1908ef8470cee0e8ac97f3d4b - docVersion: 10.21.18 - speakeasyVersion: 1.661.3 + docChecksum: 5a64228df36ed373024a7e607d7107cf + docVersion: 10.21.19 + speakeasyVersion: 1.662.0 generationVersion: 2.763.3 - releaseVersion: 0.27.9 - configChecksum: 7b37d7d128984d7847b3a1bcea3566af + releaseVersion: 0.27.10 + configChecksum: 64c3b156ac4de5cbc110ba3fe8a4060b repoURL: https://github.com/apideck-libraries/sdk-java.git published: true features: @@ -52,6 +52,7 @@ generatedFiles: - docs/models/components/AccountingLocation.md - docs/models/components/AccountingLocationInput.md - docs/models/components/AccountingLocationsFilter.md + - docs/models/components/AccountingMethod.md - docs/models/components/ActivitiesFilter.md - docs/models/components/ActivitiesSort.md - docs/models/components/ActivitiesSortBy.md @@ -109,6 +110,7 @@ generatedFiles: - docs/models/components/BankAccount2AccountType.md - docs/models/components/BankAccountType.md - docs/models/components/BankAccountsFilter.md + - docs/models/components/BankAccountsFilterAccountType.md - docs/models/components/BankAccountsFilterStatus.md - docs/models/components/BankAccountsSort.md - docs/models/components/BankFeedAccount.md @@ -721,6 +723,7 @@ generatedFiles: - docs/models/components/ProductStatus.md - docs/models/components/ProfitAndLoss.md - docs/models/components/ProfitAndLossFilter.md + - docs/models/components/ProfitAndLossFilterAccountingMethod.md - docs/models/components/ProfitAndLossIndicator.md - docs/models/components/ProfitAndLossType.md - docs/models/components/Project.md @@ -1842,6 +1845,7 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/AccountingLocation.java - src/main/java/com/apideck/unify/models/components/AccountingLocationInput.java - src/main/java/com/apideck/unify/models/components/AccountingLocationsFilter.java + - src/main/java/com/apideck/unify/models/components/AccountingMethod.java - src/main/java/com/apideck/unify/models/components/ActivitiesFilter.java - src/main/java/com/apideck/unify/models/components/ActivitiesSort.java - src/main/java/com/apideck/unify/models/components/ActivitiesSortBy.java @@ -1899,6 +1903,7 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/BankAccount2AccountType.java - src/main/java/com/apideck/unify/models/components/BankAccountType.java - src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java + - src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java - src/main/java/com/apideck/unify/models/components/BankAccountsFilterStatus.java - src/main/java/com/apideck/unify/models/components/BankAccountsSort.java - src/main/java/com/apideck/unify/models/components/BankFeedAccount.java @@ -2512,6 +2517,7 @@ generatedFiles: - src/main/java/com/apideck/unify/models/components/ProductStatus.java - src/main/java/com/apideck/unify/models/components/ProfitAndLoss.java - src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java + - src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java - src/main/java/com/apideck/unify/models/components/ProfitAndLossIndicator.java - src/main/java/com/apideck/unify/models/components/ProfitAndLossType.java - src/main/java/com/apideck/unify/models/components/Project.java @@ -7103,7 +7109,7 @@ examples: parameters: query: pass_through: {"search": "San Francisco"} - filter: {"start_date": "2021-01-01", "end_date": "2021-12-31", "period_count": 3, "period_type": "month", "location_id": "123"} + filter: {"start_date": "2021-01-01", "end_date": "2021-12-31", "period_count": 3, "period_type": "month", "location_id": "123", "accounting_method": "accrual"} raw: false header: x-apideck-consumer-id: "test-consumer" @@ -7155,7 +7161,7 @@ examples: parameters: query: raw: false - filter: {"customer_id": "123abc", "start_date": "2021-01-01", "end_date": "2021-12-31", "location_id": "123"} + filter: {"customer_id": "123abc", "start_date": "2021-01-01", "end_date": "2021-12-31", "location_id": "123", "accounting_method": "accrual"} pass_through: {"search": "San Francisco"} fields: "id,updated_at" header: @@ -19801,7 +19807,7 @@ examples: query: raw: false limit: 20 - filter: {"name": "Main Operating", "status": "active"} + filter: {"name": "Main Operating", "account_type": "checking", "status": "active"} sort: {"by": "updated_at", "direction": "asc"} pass_through: {"search": "San Francisco"} fields: "id,updated_at" @@ -19864,7 +19870,7 @@ examples: x-apideck-service-id: "salesforce" responses: "200": - application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-accounts", "operation": "one", "data": {"id": "12345", "display_id": "BA-001", "name": "Main Operating Account", "account_number": "123465", "account_type": "checking", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_by": "12345"}} + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-accounts", "operation": "one", "data": {"id": "12345", "downstream_id": "12345", "display_id": "BA-001", "name": "Main Operating Account", "account_number": "123465", "account_type": "checking", "ledger_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_by": "12345"}} "400": application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} "401": @@ -20068,4 +20074,4 @@ 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 Detected:\n* `apideck.accounting.taxRates.list()`: `response.data.[].country` **Added**\n* `apideck.accounting.taxRates.create()`: \n * `request.taxRate.country` **Added**\n* `apideck.accounting.taxRates.get()`: `response.data.country` **Added**\n* `apideck.accounting.taxRates.update()`: \n * `request.taxRate.country` **Added**\n* `apideck.accounting.companyInfo.get()`: `response.data.defaultSalesTax.country` **Added**\n" +releaseNotes: "## Java SDK Changes Detected:\n* `apideck.accounting.balanceSheet.get()`: \n * `request.filter` **Changed**\n* `apideck.accounting.profitAndLoss.get()`: \n * `request.filter` **Changed**\n* `apideck.accounting.bankAccounts.list()`: \n * `request.filter` **Changed**\n * `response.data.[].downstreamId` **Added**\n* `apideck.accounting.bankAccounts.get()`: `response.data.downstreamId` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 812ee153a..a7a651492 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.27.9 + version: 0.27.10 additionalDependencies: [] additionalPlugins: [] artifactID: unify diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ae15b2eb2..caab84e77 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.661.3 +speakeasyVersion: 1.662.0 sources: Apideck-OAS: sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:f06d45c8093c174ccfbc9c5d83c1360f03c87489b57b6161a53f7cb310d0b2cb - sourceBlobDigest: sha256:ded010a987213606a40ad118f6bd177d5c3b54461d6b10a7bc98d24c26237ce4 + sourceRevisionDigest: sha256:8df4386a1b824ab71ddd134b208d495f0ce615a5e8cc41cd90f95a179518cd41 + sourceBlobDigest: sha256:94ee8d694aa860e54a88ca1d2205746bc55a3742c00bf2424f54e1695fa361be tags: - latest - - speakeasy-sdk-regen-1764155629 - - 10.21.18 + - speakeasy-sdk-regen-1764199324 + - 10.21.19 targets: apideck: source: Apideck-OAS sourceNamespace: apideck-oas - sourceRevisionDigest: sha256:f06d45c8093c174ccfbc9c5d83c1360f03c87489b57b6161a53f7cb310d0b2cb - sourceBlobDigest: sha256:ded010a987213606a40ad118f6bd177d5c3b54461d6b10a7bc98d24c26237ce4 + sourceRevisionDigest: sha256:8df4386a1b824ab71ddd134b208d495f0ce615a5e8cc41cd90f95a179518cd41 + sourceBlobDigest: sha256:94ee8d694aa860e54a88ca1d2205746bc55a3742c00bf2424f54e1695fa361be codeSamplesNamespace: apideck-oas-java-code-samples - codeSamplesRevisionDigest: sha256:5c52513665b1825c4af28590fafdfa70f7dbc414ee552f215c5abe90cce06da4 + codeSamplesRevisionDigest: sha256:a8a4b349159ce2e7d8962df894334d7166d8d544bfffd1a5746cb6e7431c6fa4 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 488016f80..466a7a8ea 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.apideck:unify:0.27.9' +implementation 'com.apideck:unify:0.27.10' ``` Maven: @@ -58,7 +58,7 @@ Maven: com.apideck unify - 0.27.9 + 0.27.10 ``` diff --git a/RELEASES.md b/RELEASES.md index 9d5744fd2..7883975bb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -648,4 +648,14 @@ Based on: ### Generated - [java v0.27.9] . ### Releases -- [Maven Central v0.27.9] https://central.sonatype.com/artifact/com.apideck/unify/0.27.9 - . \ No newline at end of file +- [Maven Central v0.27.9] https://central.sonatype.com/artifact/com.apideck/unify/0.27.9 - . + +## 2025-11-27 09:03:58 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.662.0 (2.763.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.27.10] . +### Releases +- [Maven Central v0.27.10] https://central.sonatype.com/artifact/com.apideck/unify/0.27.10 - . \ No newline at end of file diff --git a/docs/models/components/AccountingBankAccount.md b/docs/models/components/AccountingBankAccount.md index ec08436de..40bcde573 100644 --- a/docs/models/components/AccountingBankAccount.md +++ b/docs/models/components/AccountingBankAccount.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `id` | *String* | :heavy_check_mark: | A unique identifier for an object. | 12345 | +| `downstreamId` | *JsonNullable\* | :heavy_minus_sign: | The third-party API ID of original entity | 12345 | | `displayId` | *JsonNullable\* | :heavy_minus_sign: | Display ID for the bank account | BA-001 | | `name` | *JsonNullable\* | :heavy_minus_sign: | The name of the bank account | Main Operating Account | | `accountNumber` | *JsonNullable\* | :heavy_minus_sign: | The bank account number | 123465 | diff --git a/docs/models/components/AccountingMethod.md b/docs/models/components/AccountingMethod.md new file mode 100644 index 000000000..d72d69ef4 --- /dev/null +++ b/docs/models/components/AccountingMethod.md @@ -0,0 +1,11 @@ +# AccountingMethod + +The accounting method used for the report: cash or accrual. + + +## Values + +| Name | Value | +| --------- | --------- | +| `CASH` | cash | +| `ACCRUAL` | accrual | \ No newline at end of file diff --git a/docs/models/components/BalanceSheetFilter.md b/docs/models/components/BalanceSheetFilter.md index e4a5e5044..28371cc31 100644 --- a/docs/models/components/BalanceSheetFilter.md +++ b/docs/models/components/BalanceSheetFilter.md @@ -9,4 +9,5 @@ | `endDate` | *Optional\* | :heavy_minus_sign: | The end date of the period to include in the resource. | 2021-12-31 | | `periodCount` | *Optional\* | :heavy_minus_sign: | The number of periods to include in the resource. | 3 | | `periodType` | [Optional\](../../models/components/PeriodType.md) | :heavy_minus_sign: | The type of period to include in the resource: month, quarter, year. | month | -| `locationId` | *Optional\* | :heavy_minus_sign: | The ID of the location to include in the resource. | 123 | \ No newline at end of file +| `locationId` | *Optional\* | :heavy_minus_sign: | The ID of the location to include in the resource. | 123 | +| `accountingMethod` | [Optional\](../../models/components/AccountingMethod.md) | :heavy_minus_sign: | The accounting method used for the report: cash or accrual. | accrual | \ No newline at end of file diff --git a/docs/models/components/BankAccountsFilter.md b/docs/models/components/BankAccountsFilter.md index f17fcc90b..8523d5883 100644 --- a/docs/models/components/BankAccountsFilter.md +++ b/docs/models/components/BankAccountsFilter.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `name` | *Optional\* | :heavy_minus_sign: | Filter by bank account name | Main Operating | -| `status` | [Optional\](../../models/components/BankAccountsFilterStatus.md) | :heavy_minus_sign: | Filter by account status | active | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *Optional\* | :heavy_minus_sign: | Filter by bank account name | Main Operating | +| `accountType` | [Optional\](../../models/components/BankAccountsFilterAccountType.md) | :heavy_minus_sign: | Filter by account type | checking | +| `status` | [Optional\](../../models/components/BankAccountsFilterStatus.md) | :heavy_minus_sign: | Filter by account status | active | \ No newline at end of file diff --git a/docs/models/components/BankAccountsFilterAccountType.md b/docs/models/components/BankAccountsFilterAccountType.md new file mode 100644 index 000000000..f52450e12 --- /dev/null +++ b/docs/models/components/BankAccountsFilterAccountType.md @@ -0,0 +1,16 @@ +# BankAccountsFilterAccountType + +Filter by account type + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `CHECKING` | checking | +| `SAVINGS` | savings | +| `CREDIT_CARD` | credit_card | +| `MONEY_MARKET` | money_market | +| `LINE_OF_CREDIT` | line_of_credit | +| `OTHER` | other | +| `CASH` | cash | \ No newline at end of file diff --git a/docs/models/components/CreditNoteStatus.md b/docs/models/components/CreditNoteStatus.md index db9e4e957..708459fc7 100644 --- a/docs/models/components/CreditNoteStatus.md +++ b/docs/models/components/CreditNoteStatus.md @@ -5,10 +5,11 @@ Status of credit notes ## Values -| Name | Value | -| ------------ | ------------ | -| `DRAFT` | draft | -| `AUTHORISED` | authorised | -| `PAID` | paid | -| `VOIDED` | voided | -| `DELETED` | deleted | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `DRAFT` | draft | +| `AUTHORISED` | authorised | +| `PARTIALLY_PAID` | partially_paid | +| `PAID` | paid | +| `VOIDED` | voided | +| `DELETED` | deleted | \ No newline at end of file diff --git a/docs/models/components/ProfitAndLossFilter.md b/docs/models/components/ProfitAndLossFilter.md index 53ac3d787..526f57a33 100644 --- a/docs/models/components/ProfitAndLossFilter.md +++ b/docs/models/components/ProfitAndLossFilter.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `customerId` | *Optional\* | :heavy_minus_sign: | Filter by customer id | 123abc | -| `startDate` | *Optional\* | :heavy_minus_sign: | Filter by start date. If start date is given, end date is required. | 2021-01-01 | -| `endDate` | *Optional\* | :heavy_minus_sign: | Filter by end date. If end date is given, start date is required. | 2021-12-31 | -| `locationId` | *Optional\* | :heavy_minus_sign: | Filter by location id | 123 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `customerId` | *Optional\* | :heavy_minus_sign: | Filter by customer id | 123abc | +| `startDate` | *Optional\* | :heavy_minus_sign: | Filter by start date. If start date is given, end date is required. | 2021-01-01 | +| `endDate` | *Optional\* | :heavy_minus_sign: | Filter by end date. If end date is given, start date is required. | 2021-12-31 | +| `locationId` | *Optional\* | :heavy_minus_sign: | Filter by location id | 123 | +| `accountingMethod` | [Optional\](../../models/components/ProfitAndLossFilterAccountingMethod.md) | :heavy_minus_sign: | The accounting method used for the report: cash or accrual. | accrual | \ No newline at end of file diff --git a/docs/models/components/ProfitAndLossFilterAccountingMethod.md b/docs/models/components/ProfitAndLossFilterAccountingMethod.md new file mode 100644 index 000000000..323892466 --- /dev/null +++ b/docs/models/components/ProfitAndLossFilterAccountingMethod.md @@ -0,0 +1,11 @@ +# ProfitAndLossFilterAccountingMethod + +The accounting method used for the report: cash or accrual. + + +## Values + +| Name | Value | +| --------- | --------- | +| `CASH` | cash | +| `ACCRUAL` | accrual | \ No newline at end of file diff --git a/docs/models/operations/AccountingBalanceSheetOneRequest.md b/docs/models/operations/AccountingBalanceSheetOneRequest.md index 1771a52d9..6025604ea 100644 --- a/docs/models/operations/AccountingBalanceSheetOneRequest.md +++ b/docs/models/operations/AccountingBalanceSheetOneRequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `serviceId` | *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 | -| `passThrough` | Map\ | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | -| `filter` | [Optional\](../../models/components/BalanceSheetFilter.md) | :heavy_minus_sign: | Apply filters | {
"start_date": "2021-01-01",
"end_date": "2021-12-31",
"period_count": 3,
"period_type": "month",
"location_id": "123"
} | -| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `serviceId` | *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 | +| `passThrough` | Map\ | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `filter` | [Optional\](../../models/components/BalanceSheetFilter.md) | :heavy_minus_sign: | Apply filters | {
"start_date": "2021-01-01",
"end_date": "2021-12-31",
"period_count": 3,
"period_type": "month",
"location_id": "123",
"accounting_method": "accrual"
} | +| `raw` | *Optional\* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/operations/AccountingProfitAndLossOneRequest.md b/docs/models/operations/AccountingProfitAndLossOneRequest.md index b3c342c11..f7baccee3 100644 --- a/docs/models/operations/AccountingProfitAndLossOneRequest.md +++ b/docs/models/operations/AccountingProfitAndLossOneRequest.md @@ -9,6 +9,6 @@ | `consumerId` | *Optional\* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | | `appId` | *Optional\* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | | `serviceId` | *Optional\* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | -| `filter` | [Optional\](../../models/components/ProfitAndLossFilter.md) | :heavy_minus_sign: | Apply filters | {
"customer_id": "123abc",
"start_date": "2021-01-01",
"end_date": "2021-12-31",
"location_id": "123"
} | +| `filter` | [Optional\](../../models/components/ProfitAndLossFilter.md) | :heavy_minus_sign: | Apply filters | {
"customer_id": "123abc",
"start_date": "2021-01-01",
"end_date": "2021-12-31",
"location_id": "123",
"accounting_method": "accrual"
} | | `passThrough` | Map\ | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | | `fields` | *JsonNullable\* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

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

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/sdks/bankaccounts/README.md b/docs/sdks/bankaccounts/README.md index 9eb0f8385..ed989426d 100644 --- a/docs/sdks/bankaccounts/README.md +++ b/docs/sdks/bankaccounts/README.md @@ -43,6 +43,7 @@ public class Application { .serviceId("salesforce") .filter(BankAccountsFilter.builder() .name("Main Operating") + .accountType(BankAccountsFilterAccountType.CHECKING) .status(BankAccountsFilterStatus.ACTIVE) .build()) .sort(BankAccountsSort.builder() diff --git a/gradle.properties b/gradle.properties index 51870dd7e..87a6c9ce4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.apideck artifactId=unify -version=0.27.9 +version=0.27.10 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 4eeddf4a9..ecaec75ee 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.21.18"; - public static final String SDK_VERSION = "0.27.9"; + public static final String OPENAPI_DOC_VERSION = "10.21.19"; + public static final String SDK_VERSION = "0.27.10"; public static final String GEN_VERSION = "2.763.3"; 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/AccountingBankAccount.java b/src/main/java/com/apideck/unify/models/components/AccountingBankAccount.java index 78f04dd8a..b74080aa6 100644 --- a/src/main/java/com/apideck/unify/models/components/AccountingBankAccount.java +++ b/src/main/java/com/apideck/unify/models/components/AccountingBankAccount.java @@ -28,6 +28,13 @@ public class AccountingBankAccount { @JsonProperty("id") private String id; + /** + * The third-party API ID of original entity + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("downstream_id") + private JsonNullable downstreamId; + /** * Display ID for the bank account */ @@ -203,6 +210,7 @@ public class AccountingBankAccount { @JsonCreator public AccountingBankAccount( @JsonProperty("id") String id, + @JsonProperty("downstream_id") JsonNullable downstreamId, @JsonProperty("display_id") JsonNullable displayId, @JsonProperty("name") JsonNullable name, @JsonProperty("account_number") JsonNullable accountNumber, @@ -229,6 +237,7 @@ public AccountingBankAccount( @JsonProperty("created_by") JsonNullable createdBy, @JsonProperty("updated_by") JsonNullable updatedBy) { Utils.checkNotNull(id, "id"); + Utils.checkNotNull(downstreamId, "downstreamId"); Utils.checkNotNull(displayId, "displayId"); Utils.checkNotNull(name, "name"); Utils.checkNotNull(accountNumber, "accountNumber"); @@ -255,6 +264,7 @@ public AccountingBankAccount( Utils.checkNotNull(createdBy, "createdBy"); Utils.checkNotNull(updatedBy, "updatedBy"); this.id = id; + this.downstreamId = downstreamId; this.displayId = displayId; this.name = name; this.accountNumber = accountNumber; @@ -285,14 +295,14 @@ public AccountingBankAccount( public AccountingBankAccount( String id) { this(id, JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), Optional.empty(), 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(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - JsonNullable.undefined(), JsonNullable.undefined()); + Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -303,6 +313,14 @@ public String id() { return id; } + /** + * The third-party API ID of original entity + */ + @JsonIgnore + public JsonNullable downstreamId() { + return downstreamId; + } + /** * Display ID for the bank account */ @@ -518,6 +536,24 @@ public AccountingBankAccount withId(String id) { return this; } + /** + * The third-party API ID of original entity + */ + public AccountingBankAccount withDownstreamId(String downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = JsonNullable.of(downstreamId); + return this; + } + + /** + * The third-party API ID of original entity + */ + public AccountingBankAccount withDownstreamId(JsonNullable downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = downstreamId; + return this; + } + /** * Display ID for the bank account */ @@ -971,6 +1007,7 @@ public boolean equals(java.lang.Object o) { AccountingBankAccount other = (AccountingBankAccount) o; return Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.downstreamId, other.downstreamId) && Utils.enhancedDeepEquals(this.displayId, other.displayId) && Utils.enhancedDeepEquals(this.name, other.name) && Utils.enhancedDeepEquals(this.accountNumber, other.accountNumber) && @@ -1001,21 +1038,22 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, displayId, name, - accountNumber, accountType, ledgerAccount, - bankName, currency, balance, - availableBalance, overdraftLimit, routingNumber, - iban, bic, bsbNumber, - branchIdentifier, bankCode, country, - status, description, customFields, - customMappings, createdAt, updatedAt, - createdBy, updatedBy); + id, downstreamId, displayId, + name, accountNumber, accountType, + ledgerAccount, bankName, currency, + balance, availableBalance, overdraftLimit, + routingNumber, iban, bic, + bsbNumber, branchIdentifier, bankCode, + country, status, description, + customFields, customMappings, createdAt, + updatedAt, createdBy, updatedBy); } @Override public String toString() { return Utils.toString(AccountingBankAccount.class, "id", id, + "downstreamId", downstreamId, "displayId", displayId, "name", name, "accountNumber", accountNumber, @@ -1048,6 +1086,8 @@ public final static class Builder { private String id; + private JsonNullable downstreamId = JsonNullable.undefined(); + private JsonNullable displayId = JsonNullable.undefined(); private JsonNullable name = JsonNullable.undefined(); @@ -1113,6 +1153,25 @@ public Builder id(String id) { } + /** + * The third-party API ID of original entity + */ + public Builder downstreamId(String downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = JsonNullable.of(downstreamId); + return this; + } + + /** + * The third-party API ID of original entity + */ + public Builder downstreamId(JsonNullable downstreamId) { + Utils.checkNotNull(downstreamId, "downstreamId"); + this.downstreamId = downstreamId; + return this; + } + + /** * Display ID for the bank account */ @@ -1580,15 +1639,15 @@ public Builder updatedBy(JsonNullable updatedBy) { public AccountingBankAccount build() { return new AccountingBankAccount( - id, displayId, name, - accountNumber, accountType, ledgerAccount, - bankName, currency, balance, - availableBalance, overdraftLimit, routingNumber, - iban, bic, bsbNumber, - branchIdentifier, bankCode, country, - status, description, customFields, - customMappings, createdAt, updatedAt, - createdBy, updatedBy); + id, downstreamId, displayId, + name, accountNumber, accountType, + ledgerAccount, bankName, currency, + balance, availableBalance, overdraftLimit, + routingNumber, iban, bic, + bsbNumber, branchIdentifier, bankCode, + country, status, description, + customFields, customMappings, createdAt, + updatedAt, createdBy, updatedBy); } } diff --git a/src/main/java/com/apideck/unify/models/components/AccountingMethod.java b/src/main/java/com/apideck/unify/models/components/AccountingMethod.java new file mode 100644 index 000000000..435485ece --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/AccountingMethod.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * AccountingMethod + * + *

The accounting method used for the report: cash or accrual. + */ +public enum AccountingMethod { + CASH("cash"), + ACCRUAL("accrual"); + + @JsonValue + private final String value; + + AccountingMethod(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (AccountingMethod o: AccountingMethod.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java b/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java index 00a2e0370..5c8747024 100644 --- a/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java +++ b/src/main/java/com/apideck/unify/models/components/BalanceSheetFilter.java @@ -49,28 +49,37 @@ public class BalanceSheetFilter { @SpeakeasyMetadata("queryParam:name=location_id") private Optional locationId; + /** + * The accounting method used for the report: cash or accrual. + */ + @SpeakeasyMetadata("queryParam:name=accounting_method") + private Optional accountingMethod; + @JsonCreator public BalanceSheetFilter( Optional startDate, Optional endDate, Optional periodCount, Optional periodType, - Optional locationId) { + Optional locationId, + Optional accountingMethod) { Utils.checkNotNull(startDate, "startDate"); Utils.checkNotNull(endDate, "endDate"); Utils.checkNotNull(periodCount, "periodCount"); Utils.checkNotNull(periodType, "periodType"); Utils.checkNotNull(locationId, "locationId"); + Utils.checkNotNull(accountingMethod, "accountingMethod"); this.startDate = startDate; this.endDate = endDate; this.periodCount = periodCount; this.periodType = periodType; this.locationId = locationId; + this.accountingMethod = accountingMethod; } public BalanceSheetFilter() { this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -117,6 +126,15 @@ public Optional locationId() { return locationId; } + /** + * The accounting method used for the report: cash or accrual. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accountingMethod() { + return (Optional) accountingMethod; + } + public static Builder builder() { return new Builder(); } @@ -223,6 +241,25 @@ public BalanceSheetFilter withLocationId(Optional locationId) { return this; } + /** + * The accounting method used for the report: cash or accrual. + */ + public BalanceSheetFilter withAccountingMethod(AccountingMethod accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = Optional.ofNullable(accountingMethod); + return this; + } + + + /** + * The accounting method used for the report: cash or accrual. + */ + public BalanceSheetFilter withAccountingMethod(Optional accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = accountingMethod; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -237,14 +274,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.endDate, other.endDate) && Utils.enhancedDeepEquals(this.periodCount, other.periodCount) && Utils.enhancedDeepEquals(this.periodType, other.periodType) && - Utils.enhancedDeepEquals(this.locationId, other.locationId); + Utils.enhancedDeepEquals(this.locationId, other.locationId) && + Utils.enhancedDeepEquals(this.accountingMethod, other.accountingMethod); } @Override public int hashCode() { return Utils.enhancedHash( startDate, endDate, periodCount, - periodType, locationId); + periodType, locationId, accountingMethod); } @Override @@ -254,7 +292,8 @@ public String toString() { "endDate", endDate, "periodCount", periodCount, "periodType", periodType, - "locationId", locationId); + "locationId", locationId, + "accountingMethod", accountingMethod); } @SuppressWarnings("UnusedReturnValue") @@ -271,6 +310,8 @@ public final static class Builder { private Optional locationId = Optional.empty(); + private Optional accountingMethod = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -376,11 +417,30 @@ public Builder locationId(Optional locationId) { return this; } + + /** + * The accounting method used for the report: cash or accrual. + */ + public Builder accountingMethod(AccountingMethod accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = Optional.ofNullable(accountingMethod); + return this; + } + + /** + * The accounting method used for the report: cash or accrual. + */ + public Builder accountingMethod(Optional accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = accountingMethod; + return this; + } + public BalanceSheetFilter build() { return new BalanceSheetFilter( startDate, endDate, periodCount, - periodType, locationId); + periodType, locationId, accountingMethod); } } diff --git a/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java b/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java index 4a6ba6cfa..7a16e0b33 100644 --- a/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java +++ b/src/main/java/com/apideck/unify/models/components/BankAccountsFilter.java @@ -20,6 +20,12 @@ public class BankAccountsFilter { @SpeakeasyMetadata("queryParam:name=name") private Optional name; + /** + * Filter by account type + */ + @SpeakeasyMetadata("queryParam:name=account_type") + private Optional accountType; + /** * Filter by account status */ @@ -29,15 +35,18 @@ public class BankAccountsFilter { @JsonCreator public BankAccountsFilter( Optional name, + Optional accountType, Optional status) { Utils.checkNotNull(name, "name"); + Utils.checkNotNull(accountType, "accountType"); Utils.checkNotNull(status, "status"); this.name = name; + this.accountType = accountType; this.status = status; } public BankAccountsFilter() { - this(Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -48,6 +57,15 @@ public Optional name() { return name; } + /** + * Filter by account type + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accountType() { + return (Optional) accountType; + } + /** * Filter by account status */ @@ -81,6 +99,25 @@ public BankAccountsFilter withName(Optional name) { return this; } + /** + * Filter by account type + */ + public BankAccountsFilter withAccountType(BankAccountsFilterAccountType accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = Optional.ofNullable(accountType); + return this; + } + + + /** + * Filter by account type + */ + public BankAccountsFilter withAccountType(Optional accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = accountType; + return this; + } + /** * Filter by account status */ @@ -111,19 +148,21 @@ public boolean equals(java.lang.Object o) { BankAccountsFilter other = (BankAccountsFilter) o; return Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.accountType, other.accountType) && Utils.enhancedDeepEquals(this.status, other.status); } @Override public int hashCode() { return Utils.enhancedHash( - name, status); + name, accountType, status); } @Override public String toString() { return Utils.toString(BankAccountsFilter.class, "name", name, + "accountType", accountType, "status", status); } @@ -132,6 +171,8 @@ public final static class Builder { private Optional name = Optional.empty(); + private Optional accountType = Optional.empty(); + private Optional status = Optional.empty(); private Builder() { @@ -158,6 +199,25 @@ public Builder name(Optional name) { } + /** + * Filter by account type + */ + public Builder accountType(BankAccountsFilterAccountType accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = Optional.ofNullable(accountType); + return this; + } + + /** + * Filter by account type + */ + public Builder accountType(Optional accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = accountType; + return this; + } + + /** * Filter by account status */ @@ -179,7 +239,7 @@ public Builder status(Optional status) { public BankAccountsFilter build() { return new BankAccountsFilter( - name, status); + name, accountType, status); } } diff --git a/src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java b/src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java new file mode 100644 index 000000000..5ed32b6e3 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/BankAccountsFilterAccountType.java @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * BankAccountsFilterAccountType + * + *

Filter by account type + */ +public enum BankAccountsFilterAccountType { + CHECKING("checking"), + SAVINGS("savings"), + CREDIT_CARD("credit_card"), + MONEY_MARKET("money_market"), + LINE_OF_CREDIT("line_of_credit"), + OTHER("other"), + CASH("cash"); + + @JsonValue + private final String value; + + BankAccountsFilterAccountType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (BankAccountsFilterAccountType o: BankAccountsFilterAccountType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java b/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java index 967822fa5..80ad92e0c 100644 --- a/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java +++ b/src/main/java/com/apideck/unify/models/components/CreditNoteStatus.java @@ -16,6 +16,7 @@ public enum CreditNoteStatus { DRAFT("draft"), AUTHORISED("authorised"), + PARTIALLY_PAID("partially_paid"), PAID("paid"), VOIDED("voided"), DELETED("deleted"); diff --git a/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java index f07306921..950a7c724 100644 --- a/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java +++ b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilter.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Optional; @@ -37,25 +38,34 @@ public class ProfitAndLossFilter { @SpeakeasyMetadata("queryParam:name=location_id") private Optional locationId; + /** + * The accounting method used for the report: cash or accrual. + */ + @SpeakeasyMetadata("queryParam:name=accounting_method") + private Optional accountingMethod; + @JsonCreator public ProfitAndLossFilter( Optional customerId, Optional startDate, Optional endDate, - Optional locationId) { + Optional locationId, + Optional accountingMethod) { Utils.checkNotNull(customerId, "customerId"); Utils.checkNotNull(startDate, "startDate"); Utils.checkNotNull(endDate, "endDate"); Utils.checkNotNull(locationId, "locationId"); + Utils.checkNotNull(accountingMethod, "accountingMethod"); this.customerId = customerId; this.startDate = startDate; this.endDate = endDate; this.locationId = locationId; + this.accountingMethod = accountingMethod; } public ProfitAndLossFilter() { this(Optional.empty(), Optional.empty(), Optional.empty(), - Optional.empty()); + Optional.empty(), Optional.empty()); } /** @@ -90,6 +100,15 @@ public Optional locationId() { return locationId; } + /** + * The accounting method used for the report: cash or accrual. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accountingMethod() { + return (Optional) accountingMethod; + } + public static Builder builder() { return new Builder(); } @@ -171,6 +190,25 @@ public ProfitAndLossFilter withLocationId(Optional locationId) { return this; } + /** + * The accounting method used for the report: cash or accrual. + */ + public ProfitAndLossFilter withAccountingMethod(ProfitAndLossFilterAccountingMethod accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = Optional.ofNullable(accountingMethod); + return this; + } + + + /** + * The accounting method used for the report: cash or accrual. + */ + public ProfitAndLossFilter withAccountingMethod(Optional accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = accountingMethod; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -184,14 +222,15 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.customerId, other.customerId) && Utils.enhancedDeepEquals(this.startDate, other.startDate) && Utils.enhancedDeepEquals(this.endDate, other.endDate) && - Utils.enhancedDeepEquals(this.locationId, other.locationId); + Utils.enhancedDeepEquals(this.locationId, other.locationId) && + Utils.enhancedDeepEquals(this.accountingMethod, other.accountingMethod); } @Override public int hashCode() { return Utils.enhancedHash( customerId, startDate, endDate, - locationId); + locationId, accountingMethod); } @Override @@ -200,7 +239,8 @@ public String toString() { "customerId", customerId, "startDate", startDate, "endDate", endDate, - "locationId", locationId); + "locationId", locationId, + "accountingMethod", accountingMethod); } @SuppressWarnings("UnusedReturnValue") @@ -214,6 +254,8 @@ public final static class Builder { private Optional locationId = Optional.empty(); + private Optional accountingMethod = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -294,11 +336,30 @@ public Builder locationId(Optional locationId) { return this; } + + /** + * The accounting method used for the report: cash or accrual. + */ + public Builder accountingMethod(ProfitAndLossFilterAccountingMethod accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = Optional.ofNullable(accountingMethod); + return this; + } + + /** + * The accounting method used for the report: cash or accrual. + */ + public Builder accountingMethod(Optional accountingMethod) { + Utils.checkNotNull(accountingMethod, "accountingMethod"); + this.accountingMethod = accountingMethod; + return this; + } + public ProfitAndLossFilter build() { return new ProfitAndLossFilter( customerId, startDate, endDate, - locationId); + locationId, accountingMethod); } } diff --git a/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java new file mode 100644 index 000000000..65a891142 --- /dev/null +++ b/src/main/java/com/apideck/unify/models/components/ProfitAndLossFilterAccountingMethod.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.apideck.unify.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ProfitAndLossFilterAccountingMethod + * + *

The accounting method used for the report: cash or accrual. + */ +public enum ProfitAndLossFilterAccountingMethod { + CASH("cash"), + ACCRUAL("accrual"); + + @JsonValue + private final String value; + + ProfitAndLossFilterAccountingMethod(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ProfitAndLossFilterAccountingMethod o: ProfitAndLossFilterAccountingMethod.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} +