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 @@
{
".": "0.17.0"
".": "0.18.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-52bd3046e73f201c4d08edfa92756791c015be907691a7893f8e7782cc2aea6f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b6d60f8edbdc94e65f06b0b002cc8e1f27aceccc67917bea849425701ba82fb8.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.18.0 (2025-01-06)

Full Changelog: [v0.17.0...v0.18.0](https://github.com/orbcorp/orb-java/compare/v0.17.0...v0.18.0)

### Features

* **api:** api update ([#174](https://github.com/orbcorp/orb-java/issues/174)) ([61c6949](https://github.com/orbcorp/orb-java/commit/61c6949cf074b8467e46af430f4c60636a147bc0))

## 0.17.0 (2025-01-03)

Full Changelog: [v0.16.0...v0.17.0](https://github.com/orbcorp/orb-java/compare/v0.16.0...v0.17.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/0.17.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/0.18.0)

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

Expand All @@ -25,7 +25,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.with
<!-- x-release-please-start-version -->

```kotlin
implementation("com.withorb.api:orb-java:0.17.0")
implementation("com.withorb.api:orb-java:0.18.0")
```

#### Maven
Expand All @@ -34,7 +34,7 @@ implementation("com.withorb.api:orb-java:0.17.0")
<dependency>
<groupId>com.withorb.api</groupId>
<artifactId>orb-java</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

allprojects {
group = "com.withorb.api"
version = "0.17.0" // x-release-please-version
version = "0.18.0" // x-release-please-version
}


20 changes: 15 additions & 5 deletions orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ private constructor(

fun discounts(): List<InvoiceLevelDiscount> = discounts.getRequired("discounts")

/** When the invoice payment is due. */
fun dueDate(): OffsetDateTime = dueDate.getRequired("due_date")
/**
* When the invoice payment is due. The due date is null if the invoice is not yet finalized.
*/
fun dueDate(): Optional<OffsetDateTime> = Optional.ofNullable(dueDate.getNullable("due_date"))

fun id(): String = id.getRequired("id")

Expand Down Expand Up @@ -503,7 +505,9 @@ private constructor(

@JsonProperty("discounts") @ExcludeMissing fun _discounts() = discounts

/** When the invoice payment is due. */
/**
* When the invoice payment is due. The due date is null if the invoice is not yet finalized.
*/
@JsonProperty("due_date") @ExcludeMissing fun _dueDate() = dueDate

@JsonProperty("id") @ExcludeMissing fun _id() = id
Expand Down Expand Up @@ -1011,10 +1015,16 @@ private constructor(
this.discounts = discounts
}

/** When the invoice payment is due. */
/**
* When the invoice payment is due. The due date is null if the invoice is not yet
* finalized.
*/
fun dueDate(dueDate: OffsetDateTime) = dueDate(JsonField.of(dueDate))

/** When the invoice payment is due. */
/**
* When the invoice payment is due. The due date is null if the invoice is not yet
* finalized.
*/
fun dueDate(dueDate: JsonField<OffsetDateTime>) = apply { this.dueDate = dueDate }

fun id(id: String) = id(JsonField.of(id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ private constructor(

fun discounts(): List<InvoiceLevelDiscount> = discounts.getRequired("discounts")

/** When the invoice payment is due. */
fun dueDate(): OffsetDateTime = dueDate.getRequired("due_date")
/**
* When the invoice payment is due. The due date is null if the invoice is not yet finalized.
*/
fun dueDate(): Optional<OffsetDateTime> = Optional.ofNullable(dueDate.getNullable("due_date"))

fun id(): String = id.getRequired("id")

Expand Down Expand Up @@ -496,7 +498,9 @@ private constructor(

@JsonProperty("discounts") @ExcludeMissing fun _discounts() = discounts

/** When the invoice payment is due. */
/**
* When the invoice payment is due. The due date is null if the invoice is not yet finalized.
*/
@JsonProperty("due_date") @ExcludeMissing fun _dueDate() = dueDate

@JsonProperty("id") @ExcludeMissing fun _id() = id
Expand Down Expand Up @@ -1004,10 +1008,16 @@ private constructor(
this.discounts = discounts
}

/** When the invoice payment is due. */
/**
* When the invoice payment is due. The due date is null if the invoice is not yet
* finalized.
*/
fun dueDate(dueDate: OffsetDateTime) = dueDate(JsonField.of(dueDate))

/** When the invoice payment is due. */
/**
* When the invoice payment is due. The due date is null if the invoice is not yet
* finalized.
*/
fun dueDate(dueDate: JsonField<OffsetDateTime>) = apply { this.dueDate = dueDate }

fun id(id: String) = id(JsonField.of(id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ class InvoiceFetchUpcomingResponseTest {
)
)
assertThat(invoiceFetchUpcomingResponse.dueDate())
.isEqualTo(OffsetDateTime.parse("2022-05-30T07:00:00+00:00"))
.contains(OffsetDateTime.parse("2022-05-30T07:00:00+00:00"))
assertThat(invoiceFetchUpcomingResponse.eligibleToIssueAt())
.contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(invoiceFetchUpcomingResponse.hostedInvoiceUrl()).contains("hosted_invoice_url")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class InvoiceTest {
.build()
)
)
assertThat(invoice.dueDate()).isEqualTo(OffsetDateTime.parse("2022-05-30T07:00:00+00:00"))
assertThat(invoice.dueDate()).contains(OffsetDateTime.parse("2022-05-30T07:00:00+00:00"))
assertThat(invoice.eligibleToIssueAt())
.contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(invoice.hostedInvoiceUrl()).contains("hosted_invoice_url")
Expand Down
Loading