From 13d68f1f97cf56633b6e3a17286d927f6d6a327b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:10:27 +0000 Subject: [PATCH 1/2] feat(api): api update (#270) --- .stats.yml | 2 +- ...omerCreditTopUpCreateByExternalIdParams.kt | 81 ++++++++++++++++++- .../models/CustomerCreditTopUpCreateParams.kt | 81 ++++++++++++++++++- .../api/models/InvoiceVoidInvoiceParams.kt | 3 + .../api/services/async/InvoiceServiceAsync.kt | 4 + .../services/async/InvoiceServiceAsyncImpl.kt | 4 + .../api/services/blocking/InvoiceService.kt | 4 + .../services/blocking/InvoiceServiceImpl.kt | 4 + ...CreditTopUpCreateByExternalIdParamsTest.kt | 4 + .../CustomerCreditTopUpCreateParamsTest.kt | 4 + .../customers/credits/TopUpServiceTest.kt | 3 + 11 files changed, 187 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index fb35dc35..1847c9b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-097aa5c0e1408d7bd31c15caded400b84f45c0296aebdf67a1dc1a4013f371dd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-26c7b0375aaf9218b32f9af29242d38e67a8318f3ae3e8cc5d1cd86c60e89e51.yml diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParams.kt index 35d73b29..825d1de6 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParams.kt @@ -19,6 +19,7 @@ import com.withorb.api.core.http.QueryParams import com.withorb.api.core.immutableEmptyMap import com.withorb.api.core.toImmutable import com.withorb.api.errors.OrbInvalidDataException +import java.time.OffsetDateTime import java.util.Objects import java.util.Optional @@ -61,6 +62,11 @@ private constructor( */ fun threshold(): String = body.threshold() + /** + * The date from which the top-up is active. If unspecified, the top-up is active immediately. + */ + fun activeFrom(): Optional = body.activeFrom() + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -91,6 +97,11 @@ private constructor( */ fun _threshold(): JsonField = body._threshold() + /** + * The date from which the top-up is active. If unspecified, the top-up is active immediately. + */ + fun _activeFrom(): JsonField = body._activeFrom() + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -138,6 +149,9 @@ private constructor( @JsonProperty("threshold") @ExcludeMissing private val threshold: JsonField = JsonMissing.of(), + @JsonProperty("active_from") + @ExcludeMissing + private val activeFrom: JsonField = JsonMissing.of(), @JsonProperty("expires_after") @ExcludeMissing private val expiresAfter: JsonField = JsonMissing.of(), @@ -169,6 +183,13 @@ private constructor( */ fun threshold(): String = threshold.getRequired("threshold") + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(): Optional = + Optional.ofNullable(activeFrom.getNullable("active_from")) + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -205,6 +226,14 @@ private constructor( */ @JsonProperty("threshold") @ExcludeMissing fun _threshold(): JsonField = threshold + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + @JsonProperty("active_from") + @ExcludeMissing + fun _activeFrom(): JsonField = activeFrom + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -234,6 +263,7 @@ private constructor( invoiceSettings().validate() perUnitCostBasis() threshold() + activeFrom() expiresAfter() expiresAfterUnit() validated = true @@ -254,6 +284,7 @@ private constructor( private var invoiceSettings: JsonField? = null private var perUnitCostBasis: JsonField? = null private var threshold: JsonField? = null + private var activeFrom: JsonField = JsonMissing.of() private var expiresAfter: JsonField = JsonMissing.of() private var expiresAfterUnit: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -265,6 +296,7 @@ private constructor( invoiceSettings = body.invoiceSettings perUnitCostBasis = body.perUnitCostBasis threshold = body.threshold + activeFrom = body.activeFrom expiresAfter = body.expiresAfter expiresAfterUnit = body.expiresAfterUnit additionalProperties = body.additionalProperties.toMutableMap() @@ -318,6 +350,28 @@ private constructor( */ fun threshold(threshold: JsonField) = apply { this.threshold = threshold } + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: OffsetDateTime?) = + activeFrom(JsonField.ofNullable(activeFrom)) + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: Optional) = + activeFrom(activeFrom.orElse(null)) + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: JsonField) = apply { + this.activeFrom = activeFrom + } + /** * The number of days or months after which the top-up expires. If unspecified, it does * not expire. @@ -385,6 +439,7 @@ private constructor( checkRequired("invoiceSettings", invoiceSettings), checkRequired("perUnitCostBasis", perUnitCostBasis), checkRequired("threshold", threshold), + activeFrom, expiresAfter, expiresAfterUnit, additionalProperties.toImmutable(), @@ -396,17 +451,17 @@ private constructor( return true } - return /* spotless:off */ other is Body && amount == other.amount && currency == other.currency && invoiceSettings == other.invoiceSettings && perUnitCostBasis == other.perUnitCostBasis && threshold == other.threshold && expiresAfter == other.expiresAfter && expiresAfterUnit == other.expiresAfterUnit && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Body && amount == other.amount && currency == other.currency && invoiceSettings == other.invoiceSettings && perUnitCostBasis == other.perUnitCostBasis && threshold == other.threshold && activeFrom == other.activeFrom && expiresAfter == other.expiresAfter && expiresAfterUnit == other.expiresAfterUnit && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(amount, currency, invoiceSettings, perUnitCostBasis, threshold, expiresAfter, expiresAfterUnit, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(amount, currency, invoiceSettings, perUnitCostBasis, threshold, activeFrom, expiresAfter, expiresAfterUnit, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "Body{amount=$amount, currency=$currency, invoiceSettings=$invoiceSettings, perUnitCostBasis=$perUnitCostBasis, threshold=$threshold, expiresAfter=$expiresAfter, expiresAfterUnit=$expiresAfterUnit, additionalProperties=$additionalProperties}" + "Body{amount=$amount, currency=$currency, invoiceSettings=$invoiceSettings, perUnitCostBasis=$perUnitCostBasis, threshold=$threshold, activeFrom=$activeFrom, expiresAfter=$expiresAfter, expiresAfterUnit=$expiresAfterUnit, additionalProperties=$additionalProperties}" } fun toBuilder() = Builder().from(this) @@ -491,6 +546,26 @@ private constructor( */ fun threshold(threshold: JsonField) = apply { body.threshold(threshold) } + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: OffsetDateTime?) = apply { body.activeFrom(activeFrom) } + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: Optional) = activeFrom(activeFrom.orElse(null)) + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: JsonField) = apply { + body.activeFrom(activeFrom) + } + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParams.kt index 90a9d3b2..5b5a1ee6 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParams.kt @@ -19,6 +19,7 @@ import com.withorb.api.core.http.QueryParams import com.withorb.api.core.immutableEmptyMap import com.withorb.api.core.toImmutable import com.withorb.api.errors.OrbInvalidDataException +import java.time.OffsetDateTime import java.util.Objects import java.util.Optional @@ -61,6 +62,11 @@ private constructor( */ fun threshold(): String = body.threshold() + /** + * The date from which the top-up is active. If unspecified, the top-up is active immediately. + */ + fun activeFrom(): Optional = body.activeFrom() + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -91,6 +97,11 @@ private constructor( */ fun _threshold(): JsonField = body._threshold() + /** + * The date from which the top-up is active. If unspecified, the top-up is active immediately. + */ + fun _activeFrom(): JsonField = body._activeFrom() + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -138,6 +149,9 @@ private constructor( @JsonProperty("threshold") @ExcludeMissing private val threshold: JsonField = JsonMissing.of(), + @JsonProperty("active_from") + @ExcludeMissing + private val activeFrom: JsonField = JsonMissing.of(), @JsonProperty("expires_after") @ExcludeMissing private val expiresAfter: JsonField = JsonMissing.of(), @@ -169,6 +183,13 @@ private constructor( */ fun threshold(): String = threshold.getRequired("threshold") + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(): Optional = + Optional.ofNullable(activeFrom.getNullable("active_from")) + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -205,6 +226,14 @@ private constructor( */ @JsonProperty("threshold") @ExcludeMissing fun _threshold(): JsonField = threshold + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + @JsonProperty("active_from") + @ExcludeMissing + fun _activeFrom(): JsonField = activeFrom + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. @@ -234,6 +263,7 @@ private constructor( invoiceSettings().validate() perUnitCostBasis() threshold() + activeFrom() expiresAfter() expiresAfterUnit() validated = true @@ -254,6 +284,7 @@ private constructor( private var invoiceSettings: JsonField? = null private var perUnitCostBasis: JsonField? = null private var threshold: JsonField? = null + private var activeFrom: JsonField = JsonMissing.of() private var expiresAfter: JsonField = JsonMissing.of() private var expiresAfterUnit: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -265,6 +296,7 @@ private constructor( invoiceSettings = body.invoiceSettings perUnitCostBasis = body.perUnitCostBasis threshold = body.threshold + activeFrom = body.activeFrom expiresAfter = body.expiresAfter expiresAfterUnit = body.expiresAfterUnit additionalProperties = body.additionalProperties.toMutableMap() @@ -318,6 +350,28 @@ private constructor( */ fun threshold(threshold: JsonField) = apply { this.threshold = threshold } + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: OffsetDateTime?) = + activeFrom(JsonField.ofNullable(activeFrom)) + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: Optional) = + activeFrom(activeFrom.orElse(null)) + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: JsonField) = apply { + this.activeFrom = activeFrom + } + /** * The number of days or months after which the top-up expires. If unspecified, it does * not expire. @@ -385,6 +439,7 @@ private constructor( checkRequired("invoiceSettings", invoiceSettings), checkRequired("perUnitCostBasis", perUnitCostBasis), checkRequired("threshold", threshold), + activeFrom, expiresAfter, expiresAfterUnit, additionalProperties.toImmutable(), @@ -396,17 +451,17 @@ private constructor( return true } - return /* spotless:off */ other is Body && amount == other.amount && currency == other.currency && invoiceSettings == other.invoiceSettings && perUnitCostBasis == other.perUnitCostBasis && threshold == other.threshold && expiresAfter == other.expiresAfter && expiresAfterUnit == other.expiresAfterUnit && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Body && amount == other.amount && currency == other.currency && invoiceSettings == other.invoiceSettings && perUnitCostBasis == other.perUnitCostBasis && threshold == other.threshold && activeFrom == other.activeFrom && expiresAfter == other.expiresAfter && expiresAfterUnit == other.expiresAfterUnit && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(amount, currency, invoiceSettings, perUnitCostBasis, threshold, expiresAfter, expiresAfterUnit, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(amount, currency, invoiceSettings, perUnitCostBasis, threshold, activeFrom, expiresAfter, expiresAfterUnit, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "Body{amount=$amount, currency=$currency, invoiceSettings=$invoiceSettings, perUnitCostBasis=$perUnitCostBasis, threshold=$threshold, expiresAfter=$expiresAfter, expiresAfterUnit=$expiresAfterUnit, additionalProperties=$additionalProperties}" + "Body{amount=$amount, currency=$currency, invoiceSettings=$invoiceSettings, perUnitCostBasis=$perUnitCostBasis, threshold=$threshold, activeFrom=$activeFrom, expiresAfter=$expiresAfter, expiresAfterUnit=$expiresAfterUnit, additionalProperties=$additionalProperties}" } fun toBuilder() = Builder().from(this) @@ -487,6 +542,26 @@ private constructor( */ fun threshold(threshold: JsonField) = apply { body.threshold(threshold) } + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: OffsetDateTime?) = apply { body.activeFrom(activeFrom) } + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: Optional) = activeFrom(activeFrom.orElse(null)) + + /** + * The date from which the top-up is active. If unspecified, the top-up is active + * immediately. + */ + fun activeFrom(activeFrom: JsonField) = apply { + body.activeFrom(activeFrom) + } + /** * The number of days or months after which the top-up expires. If unspecified, it does not * expire. diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParams.kt index 0cc740ae..17d74029 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParams.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParams.kt @@ -19,6 +19,9 @@ import java.util.Optional * If the associated invoice has used the customer balance to change the amount due, the customer * balance operation will be reverted. For example, if the invoice used $10 of customer balance, * that amount will be added back to the customer balance upon voiding. + * + * If the invoice was used to purchase a credit block, but the invoice is not yet paid, the credit + * block will be voided. If the invoice was created due to a top-up, the top-up will be disabled. */ class InvoiceVoidInvoiceParams private constructor( diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsync.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsync.kt index 0821cec8..51197c4c 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsync.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsync.kt @@ -119,6 +119,10 @@ interface InvoiceServiceAsync { * If the associated invoice has used the customer balance to change the amount due, the * customer balance operation will be reverted. For example, if the invoice used $10 of customer * balance, that amount will be added back to the customer balance upon voiding. + * + * If the invoice was used to purchase a credit block, but the invoice is not yet paid, the + * credit block will be voided. If the invoice was created due to a top-up, the top-up will be + * disabled. */ @JvmOverloads fun voidInvoice( diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt index 0ad35b92..f1443bb5 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt @@ -301,6 +301,10 @@ class InvoiceServiceAsyncImpl internal constructor(private val clientOptions: Cl * If the associated invoice has used the customer balance to change the amount due, the * customer balance operation will be reverted. For example, if the invoice used $10 of customer * balance, that amount will be added back to the customer balance upon voiding. + * + * If the invoice was used to purchase a credit block, but the invoice is not yet paid, the + * credit block will be voided. If the invoice was created due to a top-up, the top-up will be + * disabled. */ override fun voidInvoice( params: InvoiceVoidInvoiceParams, diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceService.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceService.kt index c17dbb49..affb0ee7 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceService.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceService.kt @@ -118,6 +118,10 @@ interface InvoiceService { * If the associated invoice has used the customer balance to change the amount due, the * customer balance operation will be reverted. For example, if the invoice used $10 of customer * balance, that amount will be added back to the customer balance upon voiding. + * + * If the invoice was used to purchase a credit block, but the invoice is not yet paid, the + * credit block will be voided. If the invoice was created due to a top-up, the top-up will be + * disabled. */ @JvmOverloads fun voidInvoice( diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt index a70e5c69..926b7b18 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt @@ -255,6 +255,10 @@ class InvoiceServiceImpl internal constructor(private val clientOptions: ClientO * If the associated invoice has used the customer balance to change the amount due, the * customer balance operation will be reverted. For example, if the invoice used $10 of customer * balance, that amount will be added back to the customer balance upon voiding. + * + * If the invoice was used to purchase a credit block, but the invoice is not yet paid, the + * credit block will be voided. If the invoice was created due to a top-up, the top-up will be + * disabled. */ override fun voidInvoice( params: InvoiceVoidInvoiceParams, diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt index 80094a85..24843f64 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt @@ -2,6 +2,7 @@ package com.withorb.api.models +import java.time.OffsetDateTime import kotlin.test.assertNotNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -24,6 +25,7 @@ class CustomerCreditTopUpCreateByExternalIdParamsTest { ) .perUnitCostBasis("per_unit_cost_basis") .threshold("threshold") + .activeFrom(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .expiresAfter(0L) .expiresAfterUnit(CustomerCreditTopUpCreateByExternalIdParams.ExpiresAfterUnit.DAY) .build() @@ -46,6 +48,7 @@ class CustomerCreditTopUpCreateByExternalIdParamsTest { ) .perUnitCostBasis("per_unit_cost_basis") .threshold("threshold") + .activeFrom(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .expiresAfter(0L) .expiresAfterUnit(CustomerCreditTopUpCreateByExternalIdParams.ExpiresAfterUnit.DAY) .build() @@ -66,6 +69,7 @@ class CustomerCreditTopUpCreateByExternalIdParamsTest { ) assertThat(body.perUnitCostBasis()).isEqualTo("per_unit_cost_basis") assertThat(body.threshold()).isEqualTo("threshold") + assertThat(body.activeFrom()).contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(body.expiresAfter()).contains(0L) assertThat(body.expiresAfterUnit()) .contains(CustomerCreditTopUpCreateByExternalIdParams.ExpiresAfterUnit.DAY) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt index 2192d0eb..fe37d9ca 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt @@ -2,6 +2,7 @@ package com.withorb.api.models +import java.time.OffsetDateTime import kotlin.test.assertNotNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -24,6 +25,7 @@ class CustomerCreditTopUpCreateParamsTest { ) .perUnitCostBasis("per_unit_cost_basis") .threshold("threshold") + .activeFrom(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .expiresAfter(0L) .expiresAfterUnit(CustomerCreditTopUpCreateParams.ExpiresAfterUnit.DAY) .build() @@ -46,6 +48,7 @@ class CustomerCreditTopUpCreateParamsTest { ) .perUnitCostBasis("per_unit_cost_basis") .threshold("threshold") + .activeFrom(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .expiresAfter(0L) .expiresAfterUnit(CustomerCreditTopUpCreateParams.ExpiresAfterUnit.DAY) .build() @@ -66,6 +69,7 @@ class CustomerCreditTopUpCreateParamsTest { ) assertThat(body.perUnitCostBasis()).isEqualTo("per_unit_cost_basis") assertThat(body.threshold()).isEqualTo("threshold") + assertThat(body.activeFrom()).contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(body.expiresAfter()).contains(0L) assertThat(body.expiresAfterUnit()) .contains(CustomerCreditTopUpCreateParams.ExpiresAfterUnit.DAY) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceTest.kt index ba56e233..03e27239 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceTest.kt @@ -10,6 +10,7 @@ import com.withorb.api.models.CustomerCreditTopUpDeleteByExternalIdParams import com.withorb.api.models.CustomerCreditTopUpDeleteParams import com.withorb.api.models.CustomerCreditTopUpListByExternalIdParams import com.withorb.api.models.CustomerCreditTopUpListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -40,6 +41,7 @@ class TopUpServiceTest { ) .perUnitCostBasis("per_unit_cost_basis") .threshold("threshold") + .activeFrom(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .expiresAfter(0L) .expiresAfterUnit(CustomerCreditTopUpCreateParams.ExpiresAfterUnit.DAY) .build() @@ -104,6 +106,7 @@ class TopUpServiceTest { ) .perUnitCostBasis("per_unit_cost_basis") .threshold("threshold") + .activeFrom(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .expiresAfter(0L) .expiresAfterUnit( CustomerCreditTopUpCreateByExternalIdParams.ExpiresAfterUnit.DAY From ba3b5f364f6836459f6b3eb8d498f71ebf5f954e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 23:10:57 +0000 Subject: [PATCH 2/2] release: 0.35.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 6 +++--- build.gradle.kts | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e4e1c3ce..ce5e5c7c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.34.0" + ".": "0.35.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 35787ba0..3e6f386f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.35.0 (2025-02-21) + +Full Changelog: [v0.34.0...v0.35.0](https://github.com/orbcorp/orb-java/compare/v0.34.0...v0.35.0) + +### Features + +* **api:** api update ([#270](https://github.com/orbcorp/orb-java/issues/270)) ([13d68f1](https://github.com/orbcorp/orb-java/commit/13d68f1f97cf56633b6e3a17286d927f6d6a327b)) + ## 0.34.0 (2025-02-21) Full Changelog: [v0.33.0...v0.34.0](https://github.com/orbcorp/orb-java/compare/v0.33.0...v0.34.0) diff --git a/README.md b/README.md index ee862bc5..e7cd688b 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/0.34.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.35.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:0.34.0") +implementation("com.withorb.api:orb-java:0.35.0") ``` ### Maven @@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:0.34.0") com.withorb.api orb-java - 0.34.0 + 0.35.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index d1b7128f..93cb1d91 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ allprojects { group = "com.withorb.api" - version = "0.34.0" // x-release-please-version + version = "0.35.0" // x-release-please-version }