Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.4.0"
".": "1.5.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- x-release-please-start-version -->

[![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)

<!-- x-release-please-end -->

Expand All @@ -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
Expand All @@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:1.4.0")
<dependency>
<groupId>com.withorb.api</groupId>
<artifactId>orb-java</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -87,9 +88,10 @@ private constructor(
fun memo(): Optional<String> = 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).
Expand Down Expand Up @@ -211,9 +213,10 @@ private constructor(
fun reason(reason: JsonField<Reason>) = 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) }

Expand Down Expand Up @@ -244,9 +247,10 @@ private constructor(
fun memo(memo: JsonField<String>) = 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) }

Expand Down Expand Up @@ -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).
Expand All @@ -464,9 +469,10 @@ private constructor(
fun memo(): Optional<String> = 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).
Expand Down Expand Up @@ -596,10 +602,10 @@ private constructor(
fun reason(reason: JsonField<Reason>) = 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))

Expand Down Expand Up @@ -631,10 +637,10 @@ private constructor(
fun memo(memo: JsonField<String>) = 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))

Expand Down Expand Up @@ -788,21 +794,21 @@ 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).
*/
fun endDate(): Optional<LocalDate> = 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).
Expand Down Expand Up @@ -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))

Expand All @@ -934,10 +940,10 @@ private constructor(
fun endDate(endDate: JsonField<LocalDate>) = 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))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand All @@ -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()
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Expand Down
9 changes: 8 additions & 1 deletion orb-java-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ tasks.withType<JavaCompile>().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"
}"
}
Loading