From 88917ff0c50ec4aa1ad8ec59d34ba452fe783979 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 21:58:45 +0000 Subject: [PATCH 1/3] chore(internal): allow running specific example from cli --- orb-java-example/build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/orb-java-example/build.gradle.kts b/orb-java-example/build.gradle.kts index fae834642..4957bd3c3 100644 --- a/orb-java-example/build.gradle.kts +++ b/orb-java-example/build.gradle.kts @@ -17,5 +17,12 @@ tasks.withType().configureEach { } application { - mainClass = "com.withorb.api.example.Main" + // Use `./gradlew :orb-java-example:run` to run `Main` + // Use `./gradlew :orb-java-example:run -Dexample=Something` to run `SomethingExample` + mainClass = "com.withorb.api.example.${ + if (project.hasProperty("example")) + "${project.property("example")}Example" + else + "Main" + }" } From 9eba618b98aef66e37c29e9f8084ba6a4a9efd6b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 23:05:26 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 +- .../api/models/CreditNoteCreateParams.kt | 90 ++++++++++--------- .../api/models/CreditNoteCreateParamsTest.kt | 24 ++--- .../async/CreditNoteServiceAsyncTest.kt | 8 +- .../blocking/CreditNoteServiceTest.kt | 8 +- 5 files changed, 70 insertions(+), 64 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3888ba9f9..d44c6fa94 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e79a36262fa3c577305a43717398fb70482bb2dca47cdb3e201cbb2a590c359c.yml -openapi_spec_hash: 1e04880dccbcc082ba451083e421a471 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml +openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e config_hash: 3c3524be9607afb24d2139ce26ce5389 diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CreditNoteCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CreditNoteCreateParams.kt index a360c8a5d..aff78d0de 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CreditNoteCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CreditNoteCreateParams.kt @@ -69,9 +69,10 @@ private constructor( fun reason(): Reason = body.reason() /** - * An optional date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items. If not provided, line items will - * use their original invoice line item service periods. This date is inclusive. + * A date string to specify the global credit note service period end date in the customer's + * timezone. This will be applied to all line items that don't have their own individual service + * periods specified. If not provided, line items will use their original invoice line item + * service periods. This date is inclusive. * * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server * responded with an unexpected value). @@ -87,9 +88,10 @@ private constructor( fun memo(): Optional = body.memo() /** - * An optional date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items. If not provided, line items will - * use their original invoice line item service periods. This date is inclusive. + * A date string to specify the global credit note service period start date in the customer's + * timezone. This will be applied to all line items that don't have their own individual service + * periods specified. If not provided, line items will use their original invoice line item + * service periods. This date is inclusive. * * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server * responded with an unexpected value). @@ -211,9 +213,10 @@ private constructor( fun reason(reason: JsonField) = apply { body.reason(reason) } /** - * An optional date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items. If not provided, line items - * will use their original invoice line item service periods. This date is inclusive. + * A date string to specify the global credit note service period end date in the customer's + * timezone. This will be applied to all line items that don't have their own individual + * service periods specified. If not provided, line items will use their original invoice + * line item service periods. This date is inclusive. */ fun endDate(endDate: LocalDate?) = apply { body.endDate(endDate) } @@ -244,9 +247,10 @@ private constructor( fun memo(memo: JsonField) = apply { body.memo(memo) } /** - * An optional date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items. If not provided, line items - * will use their original invoice line item service periods. This date is inclusive. + * A date string to specify the global credit note service period start date in the + * customer's timezone. This will be applied to all line items that don't have their own + * individual service periods specified. If not provided, line items will use their original + * invoice line item service periods. This date is inclusive. */ fun startDate(startDate: LocalDate?) = apply { body.startDate(startDate) } @@ -446,9 +450,10 @@ private constructor( fun reason(): Reason = reason.getRequired("reason") /** - * An optional date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items. If not provided, line items - * will use their original invoice line item service periods. This date is inclusive. + * A date string to specify the global credit note service period end date in the customer's + * timezone. This will be applied to all line items that don't have their own individual + * service periods specified. If not provided, line items will use their original invoice + * line item service periods. This date is inclusive. * * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -464,9 +469,10 @@ private constructor( fun memo(): Optional = memo.getOptional("memo") /** - * An optional date string to specify the global credit note service period end date in the - * customer's timezone. This will be applied to all line items. If not provided, line items - * will use their original invoice line item service periods. This date is inclusive. + * A date string to specify the global credit note service period start date in the + * customer's timezone. This will be applied to all line items that don't have their own + * individual service periods specified. If not provided, line items will use their original + * invoice line item service periods. This date is inclusive. * * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -596,10 +602,10 @@ private constructor( fun reason(reason: JsonField) = apply { this.reason = reason } /** - * An optional date string to specify the global credit note service period end date in - * the customer's timezone. This will be applied to all line items. If not provided, - * line items will use their original invoice line item service periods. This date is - * inclusive. + * A date string to specify the global credit note service period end date in the + * customer's timezone. This will be applied to all line items that don't have their own + * individual service periods specified. If not provided, line items will use their + * original invoice line item service periods. This date is inclusive. */ fun endDate(endDate: LocalDate?) = endDate(JsonField.ofNullable(endDate)) @@ -631,10 +637,10 @@ private constructor( fun memo(memo: JsonField) = apply { this.memo = memo } /** - * An optional date string to specify the global credit note service period end date in - * the customer's timezone. This will be applied to all line items. If not provided, - * line items will use their original invoice line item service periods. This date is - * inclusive. + * A date string to specify the global credit note service period start date in the + * customer's timezone. This will be applied to all line items that don't have their own + * individual service periods specified. If not provided, line items will use their + * original invoice line item service periods. This date is inclusive. */ fun startDate(startDate: LocalDate?) = startDate(JsonField.ofNullable(startDate)) @@ -788,10 +794,10 @@ private constructor( fun invoiceLineItemId(): String = invoiceLineItemId.getRequired("invoice_line_item_id") /** - * An optional date string to specify this line item's credit note service period end date - * in the customer's timezone. If provided, this will be used for this specific line item. - * If not provided, will use the global end_date if available, otherwise defaults to the - * original invoice line item's end date. This date is inclusive. + * A date string to specify this line item's credit note service period end date in the + * customer's timezone. If provided, this will be used for this specific line item. If not + * provided, will use the global end_date if available, otherwise defaults to the original + * invoice line item's end date. This date is inclusive. * * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -799,10 +805,10 @@ private constructor( fun endDate(): Optional = endDate.getOptional("end_date") /** - * An optional date string to specify this line item's credit note service period start date - * in the customer's timezone. If provided, this will be used for this specific line item. - * If not provided, will use the global start_date if available, otherwise defaults to the - * original invoice line item's start date. This date is inclusive. + * A date string to specify this line item's credit note service period start date in the + * customer's timezone. If provided, this will be used for this specific line item. If not + * provided, will use the global start_date if available, otherwise defaults to the original + * invoice line item's start date. This date is inclusive. * * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -914,10 +920,10 @@ private constructor( } /** - * An optional date string to specify this line item's credit note service period end - * date in the customer's timezone. If provided, this will be used for this specific - * line item. If not provided, will use the global end_date if available, otherwise - * defaults to the original invoice line item's end date. This date is inclusive. + * A date string to specify this line item's credit note service period end date in the + * customer's timezone. If provided, this will be used for this specific line item. If + * not provided, will use the global end_date if available, otherwise defaults to the + * original invoice line item's end date. This date is inclusive. */ fun endDate(endDate: LocalDate?) = endDate(JsonField.ofNullable(endDate)) @@ -934,10 +940,10 @@ private constructor( fun endDate(endDate: JsonField) = apply { this.endDate = endDate } /** - * An optional date string to specify this line item's credit note service period start - * date in the customer's timezone. If provided, this will be used for this specific - * line item. If not provided, will use the global start_date if available, otherwise - * defaults to the original invoice line item's start date. This date is inclusive. + * A date string to specify this line item's credit note service period start date in + * the customer's timezone. If provided, this will be used for this specific line item. + * If not provided, will use the global start_date if available, otherwise defaults to + * the original invoice line item's start date. This date is inclusive. */ fun startDate(startDate: LocalDate?) = startDate(JsonField.ofNullable(startDate)) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt index b1dbbc622..9ac12b2bd 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt @@ -15,14 +15,14 @@ internal class CreditNoteCreateParamsTest { CreditNoteCreateParams.LineItem.builder() .amount("amount") .invoiceLineItemId("4khy3nwzktxv7") - .endDate(LocalDate.parse("2023-01-31")) - .startDate(LocalDate.parse("2023-01-01")) + .endDate(LocalDate.parse("2023-09-22")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) .reason(CreditNoteCreateParams.Reason.DUPLICATE) - .endDate(LocalDate.parse("2023-01-31")) + .endDate(LocalDate.parse("2023-09-22")) .memo("An optional memo for my credit note.") - .startDate(LocalDate.parse("2023-01-01")) + .startDate(LocalDate.parse("2023-09-22")) .build() } @@ -34,14 +34,14 @@ internal class CreditNoteCreateParamsTest { CreditNoteCreateParams.LineItem.builder() .amount("amount") .invoiceLineItemId("4khy3nwzktxv7") - .endDate(LocalDate.parse("2023-01-31")) - .startDate(LocalDate.parse("2023-01-01")) + .endDate(LocalDate.parse("2023-09-22")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) .reason(CreditNoteCreateParams.Reason.DUPLICATE) - .endDate(LocalDate.parse("2023-01-31")) + .endDate(LocalDate.parse("2023-09-22")) .memo("An optional memo for my credit note.") - .startDate(LocalDate.parse("2023-01-01")) + .startDate(LocalDate.parse("2023-09-22")) .build() val body = params._body() @@ -51,14 +51,14 @@ internal class CreditNoteCreateParamsTest { CreditNoteCreateParams.LineItem.builder() .amount("amount") .invoiceLineItemId("4khy3nwzktxv7") - .endDate(LocalDate.parse("2023-01-31")) - .startDate(LocalDate.parse("2023-01-01")) + .endDate(LocalDate.parse("2023-09-22")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) assertThat(body.reason()).isEqualTo(CreditNoteCreateParams.Reason.DUPLICATE) - assertThat(body.endDate()).contains(LocalDate.parse("2023-01-31")) + assertThat(body.endDate()).contains(LocalDate.parse("2023-09-22")) assertThat(body.memo()).contains("An optional memo for my credit note.") - assertThat(body.startDate()).contains(LocalDate.parse("2023-01-01")) + assertThat(body.startDate()).contains(LocalDate.parse("2023-09-22")) } @Test diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncTest.kt index 197e00d75..45c8dad66 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncTest.kt @@ -28,14 +28,14 @@ internal class CreditNoteServiceAsyncTest { CreditNoteCreateParams.LineItem.builder() .amount("amount") .invoiceLineItemId("4khy3nwzktxv7") - .endDate(LocalDate.parse("2023-01-31")) - .startDate(LocalDate.parse("2023-01-01")) + .endDate(LocalDate.parse("2023-09-22")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) .reason(CreditNoteCreateParams.Reason.DUPLICATE) - .endDate(LocalDate.parse("2023-01-31")) + .endDate(LocalDate.parse("2023-09-22")) .memo("An optional memo for my credit note.") - .startDate(LocalDate.parse("2023-01-01")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/CreditNoteServiceTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/CreditNoteServiceTest.kt index c87148ac6..5fdd282c6 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/CreditNoteServiceTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/CreditNoteServiceTest.kt @@ -28,14 +28,14 @@ internal class CreditNoteServiceTest { CreditNoteCreateParams.LineItem.builder() .amount("amount") .invoiceLineItemId("4khy3nwzktxv7") - .endDate(LocalDate.parse("2023-01-31")) - .startDate(LocalDate.parse("2023-01-01")) + .endDate(LocalDate.parse("2023-09-22")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) .reason(CreditNoteCreateParams.Reason.DUPLICATE) - .endDate(LocalDate.parse("2023-01-31")) + .endDate(LocalDate.parse("2023-09-22")) .memo("An optional memo for my credit note.") - .startDate(LocalDate.parse("2023-01-01")) + .startDate(LocalDate.parse("2023-09-22")) .build() ) From 0169ce03b1e5c06727008505426871c1d389e2ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 23:05:52 +0000 Subject: [PATCH 3/3] release: 1.5.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ README.md | 6 +++--- build.gradle.kts | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3e9af1b3a..fbd9082d7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.4.0" + ".": "1.5.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 40626eab1..4a90db914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.5.0 (2025-07-16) + +Full Changelog: [v1.4.0...v1.5.0](https://github.com/orbcorp/orb-java/compare/v1.4.0...v1.5.0) + +### Features + +* **api:** api update ([9eba618](https://github.com/orbcorp/orb-java/commit/9eba618b98aef66e37c29e9f8084ba6a4a9efd6b)) + + +### Chores + +* **internal:** allow running specific example from cli ([88917ff](https://github.com/orbcorp/orb-java/commit/88917ff0c50ec4aa1ad8ec59d34ba452fe783979)) + ## 1.4.0 (2025-07-16) Full Changelog: [v1.3.0...v1.4.0](https://github.com/orbcorp/orb-java/compare/v1.3.0...v1.4.0) diff --git a/README.md b/README.md index 0dfea0760..6597099bd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/1.4.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/1.5.0) @@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.witho ### Gradle ```kotlin -implementation("com.withorb.api:orb-java:1.4.0") +implementation("com.withorb.api:orb-java:1.5.0") ``` ### Maven @@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:1.4.0") com.withorb.api orb-java - 1.4.0 + 1.5.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index beb75bdb3..d893df117 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ allprojects { group = "com.withorb.api" - version = "1.4.0" // x-release-please-version + version = "1.5.0" // x-release-please-version }