Skip to content

Commit 83c2707

Browse files
feat(api): api update
1 parent 614dfad commit 83c2707

File tree

67 files changed

+4570
-1491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4570
-1491
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: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d631cebb768659e659427b08c22243b7993936c24214eb1fc837e172c11012c2.yml
3-
openapi_spec_hash: e025faa481e0ca183949cd81548197bf
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-62651294c6bdd7c8d1c183fe4e5ba844a7ac29d80bef9e150739354a9c431ab4.yml
3+
openapi_spec_hash: 46c5d7f541c0c2143b975be9725c9189
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

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

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ private constructor(
4848
private val invoiceGroupingKey: JsonField<String>,
4949
private val invoicingCycleConfiguration: JsonField<NewBillingCycleConfiguration>,
5050
private val metadata: JsonField<Metadata>,
51+
private val referenceId: JsonField<String>,
5152
private val additionalProperties: MutableMap<String, JsonValue>,
5253
) {
5354

@@ -95,6 +96,9 @@ private constructor(
9596
@ExcludeMissing
9697
invoicingCycleConfiguration: JsonField<NewBillingCycleConfiguration> = JsonMissing.of(),
9798
@JsonProperty("metadata") @ExcludeMissing metadata: JsonField<Metadata> = JsonMissing.of(),
99+
@JsonProperty("reference_id")
100+
@ExcludeMissing
101+
referenceId: JsonField<String> = JsonMissing.of(),
98102
) : this(
99103
bpsConfig,
100104
cadence,
@@ -113,6 +117,7 @@ private constructor(
113117
invoiceGroupingKey,
114118
invoicingCycleConfiguration,
115119
metadata,
120+
referenceId,
116121
mutableMapOf(),
117122
)
118123

@@ -259,6 +264,15 @@ private constructor(
259264
*/
260265
fun metadata(): Optional<Metadata> = metadata.getOptional("metadata")
261266

267+
/**
268+
* A transient ID that can be used to reference this price when adding adjustments in the same
269+
* API call.
270+
*
271+
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
272+
* responded with an unexpected value).
273+
*/
274+
fun referenceId(): Optional<String> = referenceId.getOptional("reference_id")
275+
262276
/**
263277
* Returns the raw JSON value of [bpsConfig].
264278
*
@@ -408,6 +422,15 @@ private constructor(
408422
*/
409423
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField<Metadata> = metadata
410424

425+
/**
426+
* Returns the raw JSON value of [referenceId].
427+
*
428+
* Unlike [referenceId], this method doesn't throw if the JSON field has an unexpected type.
429+
*/
430+
@JsonProperty("reference_id")
431+
@ExcludeMissing
432+
fun _referenceId(): JsonField<String> = referenceId
433+
411434
@JsonAnySetter
412435
private fun putAdditionalProperty(key: String, value: JsonValue) {
413436
additionalProperties.put(key, value)
@@ -460,6 +483,7 @@ private constructor(
460483
private var invoicingCycleConfiguration: JsonField<NewBillingCycleConfiguration> =
461484
JsonMissing.of()
462485
private var metadata: JsonField<Metadata> = JsonMissing.of()
486+
private var referenceId: JsonField<String> = JsonMissing.of()
463487
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
464488

465489
@JvmSynthetic
@@ -481,6 +505,7 @@ private constructor(
481505
invoiceGroupingKey = newPlanBpsPrice.invoiceGroupingKey
482506
invoicingCycleConfiguration = newPlanBpsPrice.invoicingCycleConfiguration
483507
metadata = newPlanBpsPrice.metadata
508+
referenceId = newPlanBpsPrice.referenceId
484509
additionalProperties = newPlanBpsPrice.additionalProperties.toMutableMap()
485510
}
486511

@@ -858,6 +883,24 @@ private constructor(
858883
*/
859884
fun metadata(metadata: JsonField<Metadata>) = apply { this.metadata = metadata }
860885

886+
/**
887+
* A transient ID that can be used to reference this price when adding adjustments in the
888+
* same API call.
889+
*/
890+
fun referenceId(referenceId: String?) = referenceId(JsonField.ofNullable(referenceId))
891+
892+
/** Alias for calling [Builder.referenceId] with `referenceId.orElse(null)`. */
893+
fun referenceId(referenceId: Optional<String>) = referenceId(referenceId.getOrNull())
894+
895+
/**
896+
* Sets [Builder.referenceId] to an arbitrary JSON value.
897+
*
898+
* You should usually call [Builder.referenceId] with a well-typed [String] value instead.
899+
* This method is primarily for setting the field to an undocumented or not yet supported
900+
* value.
901+
*/
902+
fun referenceId(referenceId: JsonField<String>) = apply { this.referenceId = referenceId }
903+
861904
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
862905
this.additionalProperties.clear()
863906
putAllAdditionalProperties(additionalProperties)
@@ -912,6 +955,7 @@ private constructor(
912955
invoiceGroupingKey,
913956
invoicingCycleConfiguration,
914957
metadata,
958+
referenceId,
915959
additionalProperties.toMutableMap(),
916960
)
917961
}
@@ -940,6 +984,7 @@ private constructor(
940984
invoiceGroupingKey()
941985
invoicingCycleConfiguration().ifPresent { it.validate() }
942986
metadata().ifPresent { it.validate() }
987+
referenceId()
943988
validated = true
944989
}
945990

@@ -974,7 +1019,8 @@ private constructor(
9741019
(if (fixedPriceQuantity.asKnown().isPresent) 1 else 0) +
9751020
(if (invoiceGroupingKey.asKnown().isPresent) 1 else 0) +
9761021
(invoicingCycleConfiguration.asKnown().getOrNull()?.validity() ?: 0) +
977-
(metadata.asKnown().getOrNull()?.validity() ?: 0)
1022+
(metadata.asKnown().getOrNull()?.validity() ?: 0) +
1023+
(if (referenceId.asKnown().isPresent) 1 else 0)
9781024

9791025
/** The cadence to bill for this price on. */
9801026
class Cadence @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
@@ -1534,15 +1580,15 @@ private constructor(
15341580
return true
15351581
}
15361582

1537-
return /* spotless:off */ other is NewPlanBpsPrice && bpsConfig == other.bpsConfig && cadence == other.cadence && itemId == other.itemId && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && conversionRateConfig == other.conversionRateConfig && currency == other.currency && dimensionalPriceConfiguration == other.dimensionalPriceConfiguration && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */
1583+
return /* spotless:off */ other is NewPlanBpsPrice && bpsConfig == other.bpsConfig && cadence == other.cadence && itemId == other.itemId && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && conversionRateConfig == other.conversionRateConfig && currency == other.currency && dimensionalPriceConfiguration == other.dimensionalPriceConfiguration && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && referenceId == other.referenceId && additionalProperties == other.additionalProperties /* spotless:on */
15381584
}
15391585

15401586
/* spotless:off */
1541-
private val hashCode: Int by lazy { Objects.hash(bpsConfig, cadence, itemId, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, conversionRateConfig, currency, dimensionalPriceConfiguration, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) }
1587+
private val hashCode: Int by lazy { Objects.hash(bpsConfig, cadence, itemId, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, conversionRateConfig, currency, dimensionalPriceConfiguration, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, referenceId, additionalProperties) }
15421588
/* spotless:on */
15431589

15441590
override fun hashCode(): Int = hashCode
15451591

15461592
override fun toString() =
1547-
"NewPlanBpsPrice{bpsConfig=$bpsConfig, cadence=$cadence, itemId=$itemId, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, conversionRateConfig=$conversionRateConfig, currency=$currency, dimensionalPriceConfiguration=$dimensionalPriceConfiguration, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}"
1593+
"NewPlanBpsPrice{bpsConfig=$bpsConfig, cadence=$cadence, itemId=$itemId, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, conversionRateConfig=$conversionRateConfig, currency=$currency, dimensionalPriceConfiguration=$dimensionalPriceConfiguration, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, referenceId=$referenceId, additionalProperties=$additionalProperties}"
15481594
}

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

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ private constructor(
4848
private val invoiceGroupingKey: JsonField<String>,
4949
private val invoicingCycleConfiguration: JsonField<NewBillingCycleConfiguration>,
5050
private val metadata: JsonField<Metadata>,
51+
private val referenceId: JsonField<String>,
5152
private val additionalProperties: MutableMap<String, JsonValue>,
5253
) {
5354

@@ -95,6 +96,9 @@ private constructor(
9596
@ExcludeMissing
9697
invoicingCycleConfiguration: JsonField<NewBillingCycleConfiguration> = JsonMissing.of(),
9798
@JsonProperty("metadata") @ExcludeMissing metadata: JsonField<Metadata> = JsonMissing.of(),
99+
@JsonProperty("reference_id")
100+
@ExcludeMissing
101+
referenceId: JsonField<String> = JsonMissing.of(),
98102
) : this(
99103
bulkBpsConfig,
100104
cadence,
@@ -113,6 +117,7 @@ private constructor(
113117
invoiceGroupingKey,
114118
invoicingCycleConfiguration,
115119
metadata,
120+
referenceId,
116121
mutableMapOf(),
117122
)
118123

@@ -259,6 +264,15 @@ private constructor(
259264
*/
260265
fun metadata(): Optional<Metadata> = metadata.getOptional("metadata")
261266

267+
/**
268+
* A transient ID that can be used to reference this price when adding adjustments in the same
269+
* API call.
270+
*
271+
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
272+
* responded with an unexpected value).
273+
*/
274+
fun referenceId(): Optional<String> = referenceId.getOptional("reference_id")
275+
262276
/**
263277
* Returns the raw JSON value of [bulkBpsConfig].
264278
*
@@ -410,6 +424,15 @@ private constructor(
410424
*/
411425
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonField<Metadata> = metadata
412426

427+
/**
428+
* Returns the raw JSON value of [referenceId].
429+
*
430+
* Unlike [referenceId], this method doesn't throw if the JSON field has an unexpected type.
431+
*/
432+
@JsonProperty("reference_id")
433+
@ExcludeMissing
434+
fun _referenceId(): JsonField<String> = referenceId
435+
413436
@JsonAnySetter
414437
private fun putAdditionalProperty(key: String, value: JsonValue) {
415438
additionalProperties.put(key, value)
@@ -462,6 +485,7 @@ private constructor(
462485
private var invoicingCycleConfiguration: JsonField<NewBillingCycleConfiguration> =
463486
JsonMissing.of()
464487
private var metadata: JsonField<Metadata> = JsonMissing.of()
488+
private var referenceId: JsonField<String> = JsonMissing.of()
465489
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
466490

467491
@JvmSynthetic
@@ -483,6 +507,7 @@ private constructor(
483507
invoiceGroupingKey = newPlanBulkBpsPrice.invoiceGroupingKey
484508
invoicingCycleConfiguration = newPlanBulkBpsPrice.invoicingCycleConfiguration
485509
metadata = newPlanBulkBpsPrice.metadata
510+
referenceId = newPlanBulkBpsPrice.referenceId
486511
additionalProperties = newPlanBulkBpsPrice.additionalProperties.toMutableMap()
487512
}
488513

@@ -862,6 +887,24 @@ private constructor(
862887
*/
863888
fun metadata(metadata: JsonField<Metadata>) = apply { this.metadata = metadata }
864889

890+
/**
891+
* A transient ID that can be used to reference this price when adding adjustments in the
892+
* same API call.
893+
*/
894+
fun referenceId(referenceId: String?) = referenceId(JsonField.ofNullable(referenceId))
895+
896+
/** Alias for calling [Builder.referenceId] with `referenceId.orElse(null)`. */
897+
fun referenceId(referenceId: Optional<String>) = referenceId(referenceId.getOrNull())
898+
899+
/**
900+
* Sets [Builder.referenceId] to an arbitrary JSON value.
901+
*
902+
* You should usually call [Builder.referenceId] with a well-typed [String] value instead.
903+
* This method is primarily for setting the field to an undocumented or not yet supported
904+
* value.
905+
*/
906+
fun referenceId(referenceId: JsonField<String>) = apply { this.referenceId = referenceId }
907+
865908
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
866909
this.additionalProperties.clear()
867910
putAllAdditionalProperties(additionalProperties)
@@ -916,6 +959,7 @@ private constructor(
916959
invoiceGroupingKey,
917960
invoicingCycleConfiguration,
918961
metadata,
962+
referenceId,
919963
additionalProperties.toMutableMap(),
920964
)
921965
}
@@ -944,6 +988,7 @@ private constructor(
944988
invoiceGroupingKey()
945989
invoicingCycleConfiguration().ifPresent { it.validate() }
946990
metadata().ifPresent { it.validate() }
991+
referenceId()
947992
validated = true
948993
}
949994

@@ -978,7 +1023,8 @@ private constructor(
9781023
(if (fixedPriceQuantity.asKnown().isPresent) 1 else 0) +
9791024
(if (invoiceGroupingKey.asKnown().isPresent) 1 else 0) +
9801025
(invoicingCycleConfiguration.asKnown().getOrNull()?.validity() ?: 0) +
981-
(metadata.asKnown().getOrNull()?.validity() ?: 0)
1026+
(metadata.asKnown().getOrNull()?.validity() ?: 0) +
1027+
(if (referenceId.asKnown().isPresent) 1 else 0)
9821028

9831029
/** The cadence to bill for this price on. */
9841030
class Cadence @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
@@ -1538,15 +1584,15 @@ private constructor(
15381584
return true
15391585
}
15401586

1541-
return /* spotless:off */ other is NewPlanBulkBpsPrice && bulkBpsConfig == other.bulkBpsConfig && cadence == other.cadence && itemId == other.itemId && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && conversionRateConfig == other.conversionRateConfig && currency == other.currency && dimensionalPriceConfiguration == other.dimensionalPriceConfiguration && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && additionalProperties == other.additionalProperties /* spotless:on */
1587+
return /* spotless:off */ other is NewPlanBulkBpsPrice && bulkBpsConfig == other.bulkBpsConfig && cadence == other.cadence && itemId == other.itemId && modelType == other.modelType && name == other.name && billableMetricId == other.billableMetricId && billedInAdvance == other.billedInAdvance && billingCycleConfiguration == other.billingCycleConfiguration && conversionRate == other.conversionRate && conversionRateConfig == other.conversionRateConfig && currency == other.currency && dimensionalPriceConfiguration == other.dimensionalPriceConfiguration && externalPriceId == other.externalPriceId && fixedPriceQuantity == other.fixedPriceQuantity && invoiceGroupingKey == other.invoiceGroupingKey && invoicingCycleConfiguration == other.invoicingCycleConfiguration && metadata == other.metadata && referenceId == other.referenceId && additionalProperties == other.additionalProperties /* spotless:on */
15421588
}
15431589

15441590
/* spotless:off */
1545-
private val hashCode: Int by lazy { Objects.hash(bulkBpsConfig, cadence, itemId, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, conversionRateConfig, currency, dimensionalPriceConfiguration, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, additionalProperties) }
1591+
private val hashCode: Int by lazy { Objects.hash(bulkBpsConfig, cadence, itemId, modelType, name, billableMetricId, billedInAdvance, billingCycleConfiguration, conversionRate, conversionRateConfig, currency, dimensionalPriceConfiguration, externalPriceId, fixedPriceQuantity, invoiceGroupingKey, invoicingCycleConfiguration, metadata, referenceId, additionalProperties) }
15461592
/* spotless:on */
15471593

15481594
override fun hashCode(): Int = hashCode
15491595

15501596
override fun toString() =
1551-
"NewPlanBulkBpsPrice{bulkBpsConfig=$bulkBpsConfig, cadence=$cadence, itemId=$itemId, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, conversionRateConfig=$conversionRateConfig, currency=$currency, dimensionalPriceConfiguration=$dimensionalPriceConfiguration, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, additionalProperties=$additionalProperties}"
1597+
"NewPlanBulkBpsPrice{bulkBpsConfig=$bulkBpsConfig, cadence=$cadence, itemId=$itemId, modelType=$modelType, name=$name, billableMetricId=$billableMetricId, billedInAdvance=$billedInAdvance, billingCycleConfiguration=$billingCycleConfiguration, conversionRate=$conversionRate, conversionRateConfig=$conversionRateConfig, currency=$currency, dimensionalPriceConfiguration=$dimensionalPriceConfiguration, externalPriceId=$externalPriceId, fixedPriceQuantity=$fixedPriceQuantity, invoiceGroupingKey=$invoiceGroupingKey, invoicingCycleConfiguration=$invoicingCycleConfiguration, metadata=$metadata, referenceId=$referenceId, additionalProperties=$additionalProperties}"
15521598
}

0 commit comments

Comments
 (0)