Skip to content

Commit 20822d6

Browse files
feat(api): api update (#264)
1 parent 069892c commit 20822d6

12 files changed

Lines changed: 662 additions & 641 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7791652a23b1ed216bba0b8fa77798252f78b0525fbd77cc29ee92c6d5739c5a.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-99ab2def905df4700d0555a61c3e6f3e378664df85756fc0ff604aed8f8c5f8b.yml

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ private constructor(
582582
@JsonProperty("amount")
583583
@ExcludeMissing
584584
private val amount: JsonField<String> = JsonMissing.of(),
585+
@JsonProperty("item_id")
586+
@ExcludeMissing
587+
private val itemId: JsonField<String> = JsonMissing.of(),
585588
@JsonProperty("name")
586589
@ExcludeMissing
587590
private val name: JsonField<String> = JsonMissing.of(),
@@ -607,6 +610,9 @@ private constructor(
607610
/** The amount of the line item, including any line item minimums and discounts. */
608611
fun amount(): String = amount.getRequired("amount")
609612

613+
/** The id of the item associated with this line item. */
614+
fun itemId(): String = itemId.getRequired("item_id")
615+
610616
/** The name of the corresponding invoice line item. */
611617
fun name(): String = name.getRequired("name")
612618

@@ -629,6 +635,9 @@ private constructor(
629635
/** The amount of the line item, including any line item minimums and discounts. */
630636
@JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField<String> = amount
631637

638+
/** The id of the item associated with this line item. */
639+
@JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField<String> = itemId
640+
632641
/** The name of the corresponding invoice line item. */
633642
@JsonProperty("name") @ExcludeMissing fun _name(): JsonField<String> = name
634643

@@ -661,6 +670,7 @@ private constructor(
661670

662671
id()
663672
amount()
673+
itemId()
664674
name()
665675
quantity()
666676
subtotal()
@@ -681,6 +691,7 @@ private constructor(
681691

682692
private var id: JsonField<String>? = null
683693
private var amount: JsonField<String>? = null
694+
private var itemId: JsonField<String>? = null
684695
private var name: JsonField<String>? = null
685696
private var quantity: JsonField<Double>? = null
686697
private var subtotal: JsonField<String>? = null
@@ -692,6 +703,7 @@ private constructor(
692703
internal fun from(lineItem: LineItem) = apply {
693704
id = lineItem.id
694705
amount = lineItem.amount
706+
itemId = lineItem.itemId
695707
name = lineItem.name
696708
quantity = lineItem.quantity
697709
subtotal = lineItem.subtotal
@@ -712,6 +724,12 @@ private constructor(
712724
/** The amount of the line item, including any line item minimums and discounts. */
713725
fun amount(amount: JsonField<String>) = apply { this.amount = amount }
714726

727+
/** The id of the item associated with this line item. */
728+
fun itemId(itemId: String) = itemId(JsonField.of(itemId))
729+
730+
/** The id of the item associated with this line item. */
731+
fun itemId(itemId: JsonField<String>) = apply { this.itemId = itemId }
732+
715733
/** The name of the corresponding invoice line item. */
716734
fun name(name: String) = name(JsonField.of(name))
717735

@@ -804,6 +822,7 @@ private constructor(
804822
LineItem(
805823
checkRequired("id", id),
806824
checkRequired("amount", amount),
825+
checkRequired("itemId", itemId),
807826
checkRequired("name", name),
808827
checkRequired("quantity", quantity),
809828
checkRequired("subtotal", subtotal),
@@ -1319,17 +1338,17 @@ private constructor(
13191338
return true
13201339
}
13211340

1322-
return /* spotless:off */ other is LineItem && id == other.id && amount == other.amount && name == other.name && quantity == other.quantity && subtotal == other.subtotal && taxAmounts == other.taxAmounts && discounts == other.discounts && additionalProperties == other.additionalProperties /* spotless:on */
1341+
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 */
13231342
}
13241343

13251344
/* spotless:off */
1326-
private val hashCode: Int by lazy { Objects.hash(id, amount, name, quantity, subtotal, taxAmounts, discounts, additionalProperties) }
1345+
private val hashCode: Int by lazy { Objects.hash(id, amount, itemId, name, quantity, subtotal, taxAmounts, discounts, additionalProperties) }
13271346
/* spotless:on */
13281347

13291348
override fun hashCode(): Int = hashCode
13301349

13311350
override fun toString() =
1332-
"LineItem{id=$id, amount=$amount, name=$name, quantity=$quantity, subtotal=$subtotal, taxAmounts=$taxAmounts, discounts=$discounts, additionalProperties=$additionalProperties}"
1351+
"LineItem{id=$id, amount=$amount, itemId=$itemId, name=$name, quantity=$quantity, subtotal=$subtotal, taxAmounts=$taxAmounts, discounts=$discounts, additionalProperties=$additionalProperties}"
13331352
}
13341353

13351354
/** The maximum amount applied on the original invoice */

0 commit comments

Comments
 (0)