@@ -824,6 +824,8 @@ private constructor(
824824 private val subtotal: JsonField <String >,
825825 private val taxAmounts: JsonField <List <TaxAmount >>,
826826 private val discounts: JsonField <List <Discount >>,
827+ private val endTimeExclusive: JsonField <OffsetDateTime >,
828+ private val startTimeInclusive: JsonField <OffsetDateTime >,
827829 private val additionalProperties: MutableMap <String , JsonValue >,
828830 ) {
829831
@@ -845,6 +847,12 @@ private constructor(
845847 @JsonProperty(" discounts" )
846848 @ExcludeMissing
847849 discounts: JsonField <List <Discount >> = JsonMissing .of(),
850+ @JsonProperty(" end_time_exclusive" )
851+ @ExcludeMissing
852+ endTimeExclusive: JsonField <OffsetDateTime > = JsonMissing .of(),
853+ @JsonProperty(" start_time_inclusive" )
854+ @ExcludeMissing
855+ startTimeInclusive: JsonField <OffsetDateTime > = JsonMissing .of(),
848856 ) : this (
849857 id,
850858 amount,
@@ -854,6 +862,8 @@ private constructor(
854862 subtotal,
855863 taxAmounts,
856864 discounts,
865+ endTimeExclusive,
866+ startTimeInclusive,
857867 mutableMapOf (),
858868 )
859869
@@ -921,6 +931,24 @@ private constructor(
921931 */
922932 fun discounts (): Optional <List <Discount >> = discounts.getOptional(" discounts" )
923933
934+ /* *
935+ * The end time of the service period for this credit note line item.
936+ *
937+ * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
938+ * server responded with an unexpected value).
939+ */
940+ fun endTimeExclusive (): Optional <OffsetDateTime > =
941+ endTimeExclusive.getOptional(" end_time_exclusive" )
942+
943+ /* *
944+ * The start time of the service period for this credit note line item.
945+ *
946+ * @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
947+ * server responded with an unexpected value).
948+ */
949+ fun startTimeInclusive (): Optional <OffsetDateTime > =
950+ startTimeInclusive.getOptional(" start_time_inclusive" )
951+
924952 /* *
925953 * Returns the raw JSON value of [id].
926954 *
@@ -981,6 +1009,26 @@ private constructor(
9811009 @ExcludeMissing
9821010 fun _discounts (): JsonField <List <Discount >> = discounts
9831011
1012+ /* *
1013+ * Returns the raw JSON value of [endTimeExclusive].
1014+ *
1015+ * Unlike [endTimeExclusive], this method doesn't throw if the JSON field has an unexpected
1016+ * type.
1017+ */
1018+ @JsonProperty(" end_time_exclusive" )
1019+ @ExcludeMissing
1020+ fun _endTimeExclusive (): JsonField <OffsetDateTime > = endTimeExclusive
1021+
1022+ /* *
1023+ * Returns the raw JSON value of [startTimeInclusive].
1024+ *
1025+ * Unlike [startTimeInclusive], this method doesn't throw if the JSON field has an
1026+ * unexpected type.
1027+ */
1028+ @JsonProperty(" start_time_inclusive" )
1029+ @ExcludeMissing
1030+ fun _startTimeInclusive (): JsonField <OffsetDateTime > = startTimeInclusive
1031+
9841032 @JsonAnySetter
9851033 private fun putAdditionalProperty (key : String , value : JsonValue ) {
9861034 additionalProperties.put(key, value)
@@ -1023,6 +1071,8 @@ private constructor(
10231071 private var subtotal: JsonField <String >? = null
10241072 private var taxAmounts: JsonField <MutableList <TaxAmount >>? = null
10251073 private var discounts: JsonField <MutableList <Discount >>? = null
1074+ private var endTimeExclusive: JsonField <OffsetDateTime > = JsonMissing .of()
1075+ private var startTimeInclusive: JsonField <OffsetDateTime > = JsonMissing .of()
10261076 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
10271077
10281078 @JvmSynthetic
@@ -1035,6 +1085,8 @@ private constructor(
10351085 subtotal = lineItem.subtotal
10361086 taxAmounts = lineItem.taxAmounts.map { it.toMutableList() }
10371087 discounts = lineItem.discounts.map { it.toMutableList() }
1088+ endTimeExclusive = lineItem.endTimeExclusive
1089+ startTimeInclusive = lineItem.startTimeInclusive
10381090 additionalProperties = lineItem.additionalProperties.toMutableMap()
10391091 }
10401092
@@ -1172,6 +1224,49 @@ private constructor(
11721224 }
11731225 }
11741226
1227+ /* * The end time of the service period for this credit note line item. */
1228+ fun endTimeExclusive (endTimeExclusive : OffsetDateTime ? ) =
1229+ endTimeExclusive(JsonField .ofNullable(endTimeExclusive))
1230+
1231+ /* *
1232+ * Alias for calling [Builder.endTimeExclusive] with `endTimeExclusive.orElse(null)`.
1233+ */
1234+ fun endTimeExclusive (endTimeExclusive : Optional <OffsetDateTime >) =
1235+ endTimeExclusive(endTimeExclusive.getOrNull())
1236+
1237+ /* *
1238+ * Sets [Builder.endTimeExclusive] to an arbitrary JSON value.
1239+ *
1240+ * You should usually call [Builder.endTimeExclusive] with a well-typed [OffsetDateTime]
1241+ * value instead. This method is primarily for setting the field to an undocumented or
1242+ * not yet supported value.
1243+ */
1244+ fun endTimeExclusive (endTimeExclusive : JsonField <OffsetDateTime >) = apply {
1245+ this .endTimeExclusive = endTimeExclusive
1246+ }
1247+
1248+ /* * The start time of the service period for this credit note line item. */
1249+ fun startTimeInclusive (startTimeInclusive : OffsetDateTime ? ) =
1250+ startTimeInclusive(JsonField .ofNullable(startTimeInclusive))
1251+
1252+ /* *
1253+ * Alias for calling [Builder.startTimeInclusive] with
1254+ * `startTimeInclusive.orElse(null)`.
1255+ */
1256+ fun startTimeInclusive (startTimeInclusive : Optional <OffsetDateTime >) =
1257+ startTimeInclusive(startTimeInclusive.getOrNull())
1258+
1259+ /* *
1260+ * Sets [Builder.startTimeInclusive] to an arbitrary JSON value.
1261+ *
1262+ * You should usually call [Builder.startTimeInclusive] with a well-typed
1263+ * [OffsetDateTime] value instead. This method is primarily for setting the field to an
1264+ * undocumented or not yet supported value.
1265+ */
1266+ fun startTimeInclusive (startTimeInclusive : JsonField <OffsetDateTime >) = apply {
1267+ this .startTimeInclusive = startTimeInclusive
1268+ }
1269+
11751270 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
11761271 this .additionalProperties.clear()
11771272 putAllAdditionalProperties(additionalProperties)
@@ -1219,6 +1314,8 @@ private constructor(
12191314 checkRequired(" subtotal" , subtotal),
12201315 checkRequired(" taxAmounts" , taxAmounts).map { it.toImmutable() },
12211316 (discounts ? : JsonMissing .of()).map { it.toImmutable() },
1317+ endTimeExclusive,
1318+ startTimeInclusive,
12221319 additionalProperties.toMutableMap(),
12231320 )
12241321 }
@@ -1238,6 +1335,8 @@ private constructor(
12381335 subtotal()
12391336 taxAmounts().forEach { it.validate() }
12401337 discounts().ifPresent { it.forEach { it.validate() } }
1338+ endTimeExclusive()
1339+ startTimeInclusive()
12411340 validated = true
12421341 }
12431342
@@ -1264,7 +1363,9 @@ private constructor(
12641363 (if (quantity.asKnown().isPresent) 1 else 0 ) +
12651364 (if (subtotal.asKnown().isPresent) 1 else 0 ) +
12661365 (taxAmounts.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
1267- (discounts.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 )
1366+ (discounts.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
1367+ (if (endTimeExclusive.asKnown().isPresent) 1 else 0 ) +
1368+ (if (startTimeInclusive.asKnown().isPresent) 1 else 0 )
12681369
12691370 class Discount
12701371 private constructor (
@@ -1836,17 +1937,17 @@ private constructor(
18361937 return true
18371938 }
18381939
1839- return /* spotless:off */ other is LineItem && id == other.id && amount == other.amount && itemId == other.itemId && name == other.name && quantity == other.quantity && subtotal == other.subtotal && taxAmounts == other.taxAmounts && discounts == other.discounts && additionalProperties == other.additionalProperties /* spotless:on */
1940+ return /* spotless:off */ other is LineItem && id == other.id && amount == other.amount && itemId == other.itemId && name == other.name && quantity == other.quantity && subtotal == other.subtotal && taxAmounts == other.taxAmounts && discounts == other.discounts && endTimeExclusive == other.endTimeExclusive && startTimeInclusive == other.startTimeInclusive && additionalProperties == other.additionalProperties /* spotless:on */
18401941 }
18411942
18421943 /* spotless:off */
1843- private val hashCode: Int by lazy { Objects .hash(id, amount, itemId, name, quantity, subtotal, taxAmounts, discounts, additionalProperties) }
1944+ private val hashCode: Int by lazy { Objects .hash(id, amount, itemId, name, quantity, subtotal, taxAmounts, discounts, endTimeExclusive, startTimeInclusive, additionalProperties) }
18441945 /* spotless:on */
18451946
18461947 override fun hashCode (): Int = hashCode
18471948
18481949 override fun toString () =
1849- " LineItem{id=$id , amount=$amount , itemId=$itemId , name=$name , quantity=$quantity , subtotal=$subtotal , taxAmounts=$taxAmounts , discounts=$discounts , additionalProperties=$additionalProperties }"
1950+ " LineItem{id=$id , amount=$amount , itemId=$itemId , name=$name , quantity=$quantity , subtotal=$subtotal , taxAmounts=$taxAmounts , discounts=$discounts , endTimeExclusive= $endTimeExclusive , startTimeInclusive= $startTimeInclusive , additionalProperties=$additionalProperties }"
18501951 }
18511952
18521953 /* * The maximum amount applied on the original invoice */
0 commit comments