Skip to content

Commit db21295

Browse files
feat(api): api update
1 parent 7738ed4 commit db21295

File tree

10 files changed

+33
-70
lines changed

10 files changed

+33
-70
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-56d9f85a45eb4dfc07c2994617e1c98554d6dd748245fa4deeb706fe959c14bb.yml
3-
openapi_spec_hash: 64548564dc8ce80ef3ad38fc8cb56b30
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-672b562b91c2e644498b93b1940f8866576a6734a81346b324ed5792e9276bf3.yml
3+
openapi_spec_hash: 3c1a3cc113493afd824bdc6773a202bb
44
config_hash: e6db17547fe854b1c240407cf4c6dc9e

orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdResponse.kt

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ private constructor(
474474
(if (perUnitCostBasis.asKnown().isPresent) 1 else 0) +
475475
(status.asKnown().getOrNull()?.validity() ?: 0)
476476

477+
/** A PriceFilter that only allows item_id field for block filters. */
477478
class Filter
478479
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
479480
private constructor(
@@ -495,7 +496,7 @@ private constructor(
495496
) : this(field, operator, values, mutableMapOf())
496497

497498
/**
498-
* The property of the price to filter on.
499+
* The property of the price the block applies to. Only item_id is supported.
499500
*
500501
* @throws OrbInvalidDataException if the JSON field has an unexpected type or is
501502
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -582,7 +583,7 @@ private constructor(
582583
additionalProperties = filter.additionalProperties.toMutableMap()
583584
}
584585

585-
/** The property of the price to filter on. */
586+
/** The property of the price the block applies to. Only item_id is supported. */
586587
fun field(field: Field) = field(JsonField.of(field))
587588

588589
/**
@@ -707,7 +708,7 @@ private constructor(
707708
(operator.asKnown().getOrNull()?.validity() ?: 0) +
708709
(values.asKnown().getOrNull()?.size ?: 0)
709710

710-
/** The property of the price to filter on. */
711+
/** The property of the price the block applies to. Only item_id is supported. */
711712
class Field @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
712713

713714
/**
@@ -722,26 +723,14 @@ private constructor(
722723

723724
companion object {
724725

725-
@JvmField val PRICE_ID = of("price_id")
726-
727726
@JvmField val ITEM_ID = of("item_id")
728727

729-
@JvmField val PRICE_TYPE = of("price_type")
730-
731-
@JvmField val CURRENCY = of("currency")
732-
733-
@JvmField val PRICING_UNIT_ID = of("pricing_unit_id")
734-
735728
@JvmStatic fun of(value: String) = Field(JsonField.of(value))
736729
}
737730

738731
/** An enum containing [Field]'s known values. */
739732
enum class Known {
740-
PRICE_ID,
741-
ITEM_ID,
742-
PRICE_TYPE,
743-
CURRENCY,
744-
PRICING_UNIT_ID,
733+
ITEM_ID
745734
}
746735

747736
/**
@@ -754,11 +743,7 @@ private constructor(
754743
* - It was constructed with an arbitrary value using the [of] method.
755744
*/
756745
enum class Value {
757-
PRICE_ID,
758746
ITEM_ID,
759-
PRICE_TYPE,
760-
CURRENCY,
761-
PRICING_UNIT_ID,
762747
/**
763748
* An enum member indicating that [Field] was instantiated with an unknown value.
764749
*/
@@ -774,11 +759,7 @@ private constructor(
774759
*/
775760
fun value(): Value =
776761
when (this) {
777-
PRICE_ID -> Value.PRICE_ID
778762
ITEM_ID -> Value.ITEM_ID
779-
PRICE_TYPE -> Value.PRICE_TYPE
780-
CURRENCY -> Value.CURRENCY
781-
PRICING_UNIT_ID -> Value.PRICING_UNIT_ID
782763
else -> Value._UNKNOWN
783764
}
784765

@@ -793,11 +774,7 @@ private constructor(
793774
*/
794775
fun known(): Known =
795776
when (this) {
796-
PRICE_ID -> Known.PRICE_ID
797777
ITEM_ID -> Known.ITEM_ID
798-
PRICE_TYPE -> Known.PRICE_TYPE
799-
CURRENCY -> Known.CURRENCY
800-
PRICING_UNIT_ID -> Known.PRICING_UNIT_ID
801778
else -> throw OrbInvalidDataException("Unknown Field: $value")
802779
}
803780

orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditListResponse.kt

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ private constructor(
470470
(if (perUnitCostBasis.asKnown().isPresent) 1 else 0) +
471471
(status.asKnown().getOrNull()?.validity() ?: 0)
472472

473+
/** A PriceFilter that only allows item_id field for block filters. */
473474
class Filter
474475
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
475476
private constructor(
@@ -491,7 +492,7 @@ private constructor(
491492
) : this(field, operator, values, mutableMapOf())
492493

493494
/**
494-
* The property of the price to filter on.
495+
* The property of the price the block applies to. Only item_id is supported.
495496
*
496497
* @throws OrbInvalidDataException if the JSON field has an unexpected type or is
497498
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -578,7 +579,7 @@ private constructor(
578579
additionalProperties = filter.additionalProperties.toMutableMap()
579580
}
580581

581-
/** The property of the price to filter on. */
582+
/** The property of the price the block applies to. Only item_id is supported. */
582583
fun field(field: Field) = field(JsonField.of(field))
583584

584585
/**
@@ -703,7 +704,7 @@ private constructor(
703704
(operator.asKnown().getOrNull()?.validity() ?: 0) +
704705
(values.asKnown().getOrNull()?.size ?: 0)
705706

706-
/** The property of the price to filter on. */
707+
/** The property of the price the block applies to. Only item_id is supported. */
707708
class Field @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
708709

709710
/**
@@ -718,26 +719,14 @@ private constructor(
718719

719720
companion object {
720721

721-
@JvmField val PRICE_ID = of("price_id")
722-
723722
@JvmField val ITEM_ID = of("item_id")
724723

725-
@JvmField val PRICE_TYPE = of("price_type")
726-
727-
@JvmField val CURRENCY = of("currency")
728-
729-
@JvmField val PRICING_UNIT_ID = of("pricing_unit_id")
730-
731724
@JvmStatic fun of(value: String) = Field(JsonField.of(value))
732725
}
733726

734727
/** An enum containing [Field]'s known values. */
735728
enum class Known {
736-
PRICE_ID,
737-
ITEM_ID,
738-
PRICE_TYPE,
739-
CURRENCY,
740-
PRICING_UNIT_ID,
729+
ITEM_ID
741730
}
742731

743732
/**
@@ -750,11 +739,7 @@ private constructor(
750739
* - It was constructed with an arbitrary value using the [of] method.
751740
*/
752741
enum class Value {
753-
PRICE_ID,
754742
ITEM_ID,
755-
PRICE_TYPE,
756-
CURRENCY,
757-
PRICING_UNIT_ID,
758743
/**
759744
* An enum member indicating that [Field] was instantiated with an unknown value.
760745
*/
@@ -770,11 +755,7 @@ private constructor(
770755
*/
771756
fun value(): Value =
772757
when (this) {
773-
PRICE_ID -> Value.PRICE_ID
774758
ITEM_ID -> Value.ITEM_ID
775-
PRICE_TYPE -> Value.PRICE_TYPE
776-
CURRENCY -> Value.CURRENCY
777-
PRICING_UNIT_ID -> Value.PRICING_UNIT_ID
778759
else -> Value._UNKNOWN
779760
}
780761

@@ -789,11 +770,7 @@ private constructor(
789770
*/
790771
fun known(): Known =
791772
when (this) {
792-
PRICE_ID -> Known.PRICE_ID
793773
ITEM_ID -> Known.ITEM_ID
794-
PRICE_TYPE -> Known.PRICE_TYPE
795-
CURRENCY -> Known.CURRENCY
796-
PRICING_UNIT_ID -> Known.PRICING_UNIT_ID
797774
else -> throw OrbInvalidDataException("Unknown Field: $value")
798775
}
799776

orb-java-core/src/main/kotlin/com/withorb/api/models/EventBackfillCreateParams.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ import kotlin.jvm.optionals.getOrNull
5050
* [computed properties](/extensibility/advanced-metrics#computed-properties). The expressiveness of
5151
* computed properties allows you to deprecate existing events based on both a period of time and
5252
* specific property values.
53+
*
54+
* You may not have multiple backfills in a pending or pending_revert state with overlapping
55+
* timeframes.
5356
*/
5457
class EventBackfillCreateParams
5558
private constructor(

orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/BackfillServiceAsync.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ interface BackfillServiceAsync {
6161
* [computed properties](/extensibility/advanced-metrics#computed-properties). The
6262
* expressiveness of computed properties allows you to deprecate existing events based on both a
6363
* period of time and specific property values.
64+
*
65+
* You may not have multiple backfills in a pending or pending_revert state with overlapping
66+
* timeframes.
6467
*/
6568
fun create(params: EventBackfillCreateParams): CompletableFuture<EventBackfillCreateResponse> =
6669
create(params, RequestOptions.none())

orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/BackfillService.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ interface BackfillService {
6161
* [computed properties](/extensibility/advanced-metrics#computed-properties). The
6262
* expressiveness of computed properties allows you to deprecate existing events based on both a
6363
* period of time and specific property values.
64+
*
65+
* You may not have multiple backfills in a pending or pending_revert state with overlapping
66+
* timeframes.
6467
*/
6568
fun create(params: EventBackfillCreateParams): EventBackfillCreateResponse =
6669
create(params, RequestOptions.none())

orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdPageResponseTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal class CustomerCreditListByExternalIdPageResponseTest {
2222
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
2323
.addFilter(
2424
CustomerCreditListByExternalIdResponse.Filter.builder()
25-
.field(CustomerCreditListByExternalIdResponse.Filter.Field.PRICE_ID)
25+
.field(CustomerCreditListByExternalIdResponse.Filter.Field.ITEM_ID)
2626
.operator(
2727
CustomerCreditListByExternalIdResponse.Filter.Operator.INCLUDES
2828
)
@@ -48,7 +48,7 @@ internal class CustomerCreditListByExternalIdPageResponseTest {
4848
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
4949
.addFilter(
5050
CustomerCreditListByExternalIdResponse.Filter.builder()
51-
.field(CustomerCreditListByExternalIdResponse.Filter.Field.PRICE_ID)
51+
.field(CustomerCreditListByExternalIdResponse.Filter.Field.ITEM_ID)
5252
.operator(
5353
CustomerCreditListByExternalIdResponse.Filter.Operator.INCLUDES
5454
)
@@ -77,7 +77,7 @@ internal class CustomerCreditListByExternalIdPageResponseTest {
7777
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
7878
.addFilter(
7979
CustomerCreditListByExternalIdResponse.Filter.builder()
80-
.field(CustomerCreditListByExternalIdResponse.Filter.Field.PRICE_ID)
80+
.field(CustomerCreditListByExternalIdResponse.Filter.Field.ITEM_ID)
8181
.operator(
8282
CustomerCreditListByExternalIdResponse.Filter.Operator.INCLUDES
8383
)

orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdResponseTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class CustomerCreditListByExternalIdResponseTest {
2020
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
2121
.addFilter(
2222
CustomerCreditListByExternalIdResponse.Filter.builder()
23-
.field(CustomerCreditListByExternalIdResponse.Filter.Field.PRICE_ID)
23+
.field(CustomerCreditListByExternalIdResponse.Filter.Field.ITEM_ID)
2424
.operator(CustomerCreditListByExternalIdResponse.Filter.Operator.INCLUDES)
2525
.addValue("string")
2626
.build()
@@ -39,7 +39,7 @@ internal class CustomerCreditListByExternalIdResponseTest {
3939
assertThat(customerCreditListByExternalIdResponse.filters())
4040
.containsExactly(
4141
CustomerCreditListByExternalIdResponse.Filter.builder()
42-
.field(CustomerCreditListByExternalIdResponse.Filter.Field.PRICE_ID)
42+
.field(CustomerCreditListByExternalIdResponse.Filter.Field.ITEM_ID)
4343
.operator(CustomerCreditListByExternalIdResponse.Filter.Operator.INCLUDES)
4444
.addValue("string")
4545
.build()
@@ -62,7 +62,7 @@ internal class CustomerCreditListByExternalIdResponseTest {
6262
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
6363
.addFilter(
6464
CustomerCreditListByExternalIdResponse.Filter.builder()
65-
.field(CustomerCreditListByExternalIdResponse.Filter.Field.PRICE_ID)
65+
.field(CustomerCreditListByExternalIdResponse.Filter.Field.ITEM_ID)
6666
.operator(CustomerCreditListByExternalIdResponse.Filter.Operator.INCLUDES)
6767
.addValue("string")
6868
.build()

orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListPageResponseTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal class CustomerCreditListPageResponseTest {
2222
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
2323
.addFilter(
2424
CustomerCreditListResponse.Filter.builder()
25-
.field(CustomerCreditListResponse.Filter.Field.PRICE_ID)
25+
.field(CustomerCreditListResponse.Filter.Field.ITEM_ID)
2626
.operator(CustomerCreditListResponse.Filter.Operator.INCLUDES)
2727
.addValue("string")
2828
.build()
@@ -46,7 +46,7 @@ internal class CustomerCreditListPageResponseTest {
4646
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
4747
.addFilter(
4848
CustomerCreditListResponse.Filter.builder()
49-
.field(CustomerCreditListResponse.Filter.Field.PRICE_ID)
49+
.field(CustomerCreditListResponse.Filter.Field.ITEM_ID)
5050
.operator(CustomerCreditListResponse.Filter.Operator.INCLUDES)
5151
.addValue("string")
5252
.build()
@@ -73,7 +73,7 @@ internal class CustomerCreditListPageResponseTest {
7373
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
7474
.addFilter(
7575
CustomerCreditListResponse.Filter.builder()
76-
.field(CustomerCreditListResponse.Filter.Field.PRICE_ID)
76+
.field(CustomerCreditListResponse.Filter.Field.ITEM_ID)
7777
.operator(CustomerCreditListResponse.Filter.Operator.INCLUDES)
7878
.addValue("string")
7979
.build()

orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListResponseTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class CustomerCreditListResponseTest {
2020
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
2121
.addFilter(
2222
CustomerCreditListResponse.Filter.builder()
23-
.field(CustomerCreditListResponse.Filter.Field.PRICE_ID)
23+
.field(CustomerCreditListResponse.Filter.Field.ITEM_ID)
2424
.operator(CustomerCreditListResponse.Filter.Operator.INCLUDES)
2525
.addValue("string")
2626
.build()
@@ -39,7 +39,7 @@ internal class CustomerCreditListResponseTest {
3939
assertThat(customerCreditListResponse.filters())
4040
.containsExactly(
4141
CustomerCreditListResponse.Filter.builder()
42-
.field(CustomerCreditListResponse.Filter.Field.PRICE_ID)
42+
.field(CustomerCreditListResponse.Filter.Field.ITEM_ID)
4343
.operator(CustomerCreditListResponse.Filter.Operator.INCLUDES)
4444
.addValue("string")
4545
.build()
@@ -61,7 +61,7 @@ internal class CustomerCreditListResponseTest {
6161
.expiryDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
6262
.addFilter(
6363
CustomerCreditListResponse.Filter.builder()
64-
.field(CustomerCreditListResponse.Filter.Field.PRICE_ID)
64+
.field(CustomerCreditListResponse.Filter.Field.ITEM_ID)
6565
.operator(CustomerCreditListResponse.Filter.Operator.INCLUDES)
6666
.addValue("string")
6767
.build()

0 commit comments

Comments
 (0)