@@ -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