Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7791652a23b1ed216bba0b8fa77798252f78b0525fbd77cc29ee92c6d5739c5a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-99ab2def905df4700d0555a61c3e6f3e378664df85756fc0ff604aed8f8c5f8b.yml
25 changes: 22 additions & 3 deletions orb-java-core/src/main/kotlin/com/withorb/api/models/CreditNote.kt
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ private constructor(
@JsonProperty("amount")
@ExcludeMissing
private val amount: JsonField<String> = JsonMissing.of(),
@JsonProperty("item_id")
@ExcludeMissing
private val itemId: JsonField<String> = JsonMissing.of(),
@JsonProperty("name")
@ExcludeMissing
private val name: JsonField<String> = JsonMissing.of(),
Expand All @@ -607,6 +610,9 @@ private constructor(
/** The amount of the line item, including any line item minimums and discounts. */
fun amount(): String = amount.getRequired("amount")

/** The id of the item associated with this line item. */
fun itemId(): String = itemId.getRequired("item_id")

/** The name of the corresponding invoice line item. */
fun name(): String = name.getRequired("name")

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

/** The id of the item associated with this line item. */
@JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField<String> = itemId

/** The name of the corresponding invoice line item. */
@JsonProperty("name") @ExcludeMissing fun _name(): JsonField<String> = name

Expand Down Expand Up @@ -661,6 +670,7 @@ private constructor(

id()
amount()
itemId()
name()
quantity()
subtotal()
Expand All @@ -681,6 +691,7 @@ private constructor(

private var id: JsonField<String>? = null
private var amount: JsonField<String>? = null
private var itemId: JsonField<String>? = null
private var name: JsonField<String>? = null
private var quantity: JsonField<Double>? = null
private var subtotal: JsonField<String>? = null
Expand All @@ -692,6 +703,7 @@ private constructor(
internal fun from(lineItem: LineItem) = apply {
id = lineItem.id
amount = lineItem.amount
itemId = lineItem.itemId
name = lineItem.name
quantity = lineItem.quantity
subtotal = lineItem.subtotal
Expand All @@ -712,6 +724,12 @@ private constructor(
/** The amount of the line item, including any line item minimums and discounts. */
fun amount(amount: JsonField<String>) = apply { this.amount = amount }

/** The id of the item associated with this line item. */
fun itemId(itemId: String) = itemId(JsonField.of(itemId))

/** The id of the item associated with this line item. */
fun itemId(itemId: JsonField<String>) = apply { this.itemId = itemId }

/** The name of the corresponding invoice line item. */
fun name(name: String) = name(JsonField.of(name))

Expand Down Expand Up @@ -804,6 +822,7 @@ private constructor(
LineItem(
checkRequired("id", id),
checkRequired("amount", amount),
checkRequired("itemId", itemId),
checkRequired("name", name),
checkRequired("quantity", quantity),
checkRequired("subtotal", subtotal),
Expand Down Expand Up @@ -1319,17 +1338,17 @@ private constructor(
return true
}

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 */
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 */
}

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

override fun hashCode(): Int = hashCode

override fun toString() =
"LineItem{id=$id, amount=$amount, name=$name, quantity=$quantity, subtotal=$subtotal, taxAmounts=$taxAmounts, discounts=$discounts, additionalProperties=$additionalProperties}"
"LineItem{id=$id, amount=$amount, itemId=$itemId, name=$name, quantity=$quantity, subtotal=$subtotal, taxAmounts=$taxAmounts, discounts=$discounts, additionalProperties=$additionalProperties}"
}

/** The maximum amount applied on the original invoice */
Expand Down
Loading