Skip to content

Commit c310e36

Browse files
feat(api): api update
1 parent 5ba9c33 commit c310e36

File tree

7 files changed

+102
-4
lines changed

7 files changed

+102
-4
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: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c92fb451e13f157b3735f188acc8d57aa3adfbaac1683645e1ba4f432dd7a4f8.yml
3-
openapi_spec_hash: dbcd87ecfbd3976eb3b99ec6f9fbc606
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-77e112caf7b2a2c7b0248b7245b5730bc72ab0ea84ba5d0777e7d0604ae04d26.yml
3+
openapi_spec_hash: 966568dd08f34db64ba0ebace678268a
44
config_hash: 3279841440b02d4e8303c961d6983492

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

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ private constructor(
17871787
private val customDueDate: JsonField<CustomDueDate>,
17881788
private val invoiceDate: JsonField<InvoiceDate>,
17891789
private val itemId: JsonField<String>,
1790+
private val markAsPaid: JsonField<Boolean>,
17901791
private val memo: JsonField<String>,
17911792
private val netTerms: JsonField<Long>,
17921793
private val requireSuccessfulPayment: JsonField<Boolean>,
@@ -1807,6 +1808,9 @@ private constructor(
18071808
@JsonProperty("item_id")
18081809
@ExcludeMissing
18091810
itemId: JsonField<String> = JsonMissing.of(),
1811+
@JsonProperty("mark_as_paid")
1812+
@ExcludeMissing
1813+
markAsPaid: JsonField<Boolean> = JsonMissing.of(),
18101814
@JsonProperty("memo")
18111815
@ExcludeMissing
18121816
memo: JsonField<String> = JsonMissing.of(),
@@ -1821,6 +1825,7 @@ private constructor(
18211825
customDueDate,
18221826
invoiceDate,
18231827
itemId,
1828+
markAsPaid,
18241829
memo,
18251830
netTerms,
18261831
requireSuccessfulPayment,
@@ -1866,6 +1871,14 @@ private constructor(
18661871
*/
18671872
fun itemId(): Optional<String> = itemId.getOptional("item_id")
18681873

1874+
/**
1875+
* If true, the new credits purchase invoice will be marked as paid.
1876+
*
1877+
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if
1878+
* the server responded with an unexpected value).
1879+
*/
1880+
fun markAsPaid(): Optional<Boolean> = markAsPaid.getOptional("mark_as_paid")
1881+
18691882
/**
18701883
* An optional memo to display on the invoice.
18711884
*
@@ -1934,6 +1947,16 @@ private constructor(
19341947
*/
19351948
@JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField<String> = itemId
19361949

1950+
/**
1951+
* Returns the raw JSON value of [markAsPaid].
1952+
*
1953+
* Unlike [markAsPaid], this method doesn't throw if the JSON field has an
1954+
* unexpected type.
1955+
*/
1956+
@JsonProperty("mark_as_paid")
1957+
@ExcludeMissing
1958+
fun _markAsPaid(): JsonField<Boolean> = markAsPaid
1959+
19371960
/**
19381961
* Returns the raw JSON value of [memo].
19391962
*
@@ -1994,6 +2017,7 @@ private constructor(
19942017
private var customDueDate: JsonField<CustomDueDate> = JsonMissing.of()
19952018
private var invoiceDate: JsonField<InvoiceDate> = JsonMissing.of()
19962019
private var itemId: JsonField<String> = JsonMissing.of()
2020+
private var markAsPaid: JsonField<Boolean> = JsonMissing.of()
19972021
private var memo: JsonField<String> = JsonMissing.of()
19982022
private var netTerms: JsonField<Long> = JsonMissing.of()
19992023
private var requireSuccessfulPayment: JsonField<Boolean> = JsonMissing.of()
@@ -2005,6 +2029,7 @@ private constructor(
20052029
customDueDate = invoiceSettings.customDueDate
20062030
invoiceDate = invoiceSettings.invoiceDate
20072031
itemId = invoiceSettings.itemId
2032+
markAsPaid = invoiceSettings.markAsPaid
20082033
memo = invoiceSettings.memo
20092034
netTerms = invoiceSettings.netTerms
20102035
requireSuccessfulPayment = invoiceSettings.requireSuccessfulPayment
@@ -2110,6 +2135,20 @@ private constructor(
21102135
*/
21112136
fun itemId(itemId: JsonField<String>) = apply { this.itemId = itemId }
21122137

2138+
/** If true, the new credits purchase invoice will be marked as paid. */
2139+
fun markAsPaid(markAsPaid: Boolean) = markAsPaid(JsonField.of(markAsPaid))
2140+
2141+
/**
2142+
* Sets [Builder.markAsPaid] to an arbitrary JSON value.
2143+
*
2144+
* You should usually call [Builder.markAsPaid] with a well-typed [Boolean]
2145+
* value instead. This method is primarily for setting the field to an
2146+
* undocumented or not yet supported value.
2147+
*/
2148+
fun markAsPaid(markAsPaid: JsonField<Boolean>) = apply {
2149+
this.markAsPaid = markAsPaid
2150+
}
2151+
21132152
/** An optional memo to display on the invoice. */
21142153
fun memo(memo: String?) = memo(JsonField.ofNullable(memo))
21152154

@@ -2213,6 +2252,7 @@ private constructor(
22132252
customDueDate,
22142253
invoiceDate,
22152254
itemId,
2255+
markAsPaid,
22162256
memo,
22172257
netTerms,
22182258
requireSuccessfulPayment,
@@ -2231,6 +2271,7 @@ private constructor(
22312271
customDueDate().ifPresent { it.validate() }
22322272
invoiceDate().ifPresent { it.validate() }
22332273
itemId()
2274+
markAsPaid()
22342275
memo()
22352276
netTerms()
22362277
requireSuccessfulPayment()
@@ -2257,6 +2298,7 @@ private constructor(
22572298
(customDueDate.asKnown().getOrNull()?.validity() ?: 0) +
22582299
(invoiceDate.asKnown().getOrNull()?.validity() ?: 0) +
22592300
(if (itemId.asKnown().isPresent) 1 else 0) +
2301+
(if (markAsPaid.asKnown().isPresent) 1 else 0) +
22602302
(if (memo.asKnown().isPresent) 1 else 0) +
22612303
(if (netTerms.asKnown().isPresent) 1 else 0) +
22622304
(if (requireSuccessfulPayment.asKnown().isPresent) 1 else 0)
@@ -2632,6 +2674,7 @@ private constructor(
26322674
customDueDate == other.customDueDate &&
26332675
invoiceDate == other.invoiceDate &&
26342676
itemId == other.itemId &&
2677+
markAsPaid == other.markAsPaid &&
26352678
memo == other.memo &&
26362679
netTerms == other.netTerms &&
26372680
requireSuccessfulPayment == other.requireSuccessfulPayment &&
@@ -2644,6 +2687,7 @@ private constructor(
26442687
customDueDate,
26452688
invoiceDate,
26462689
itemId,
2690+
markAsPaid,
26472691
memo,
26482692
netTerms,
26492693
requireSuccessfulPayment,
@@ -2654,7 +2698,7 @@ private constructor(
26542698
override fun hashCode(): Int = hashCode
26552699

26562700
override fun toString() =
2657-
"InvoiceSettings{autoCollection=$autoCollection, customDueDate=$customDueDate, invoiceDate=$invoiceDate, itemId=$itemId, memo=$memo, netTerms=$netTerms, requireSuccessfulPayment=$requireSuccessfulPayment, additionalProperties=$additionalProperties}"
2701+
"InvoiceSettings{autoCollection=$autoCollection, customDueDate=$customDueDate, invoiceDate=$invoiceDate, itemId=$itemId, markAsPaid=$markAsPaid, memo=$memo, netTerms=$netTerms, requireSuccessfulPayment=$requireSuccessfulPayment, additionalProperties=$additionalProperties}"
26582702
}
26592703

26602704
/**

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

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,7 @@ private constructor(
17791779
private val customDueDate: JsonField<CustomDueDate>,
17801780
private val invoiceDate: JsonField<InvoiceDate>,
17811781
private val itemId: JsonField<String>,
1782+
private val markAsPaid: JsonField<Boolean>,
17821783
private val memo: JsonField<String>,
17831784
private val netTerms: JsonField<Long>,
17841785
private val requireSuccessfulPayment: JsonField<Boolean>,
@@ -1799,6 +1800,9 @@ private constructor(
17991800
@JsonProperty("item_id")
18001801
@ExcludeMissing
18011802
itemId: JsonField<String> = JsonMissing.of(),
1803+
@JsonProperty("mark_as_paid")
1804+
@ExcludeMissing
1805+
markAsPaid: JsonField<Boolean> = JsonMissing.of(),
18021806
@JsonProperty("memo")
18031807
@ExcludeMissing
18041808
memo: JsonField<String> = JsonMissing.of(),
@@ -1813,6 +1817,7 @@ private constructor(
18131817
customDueDate,
18141818
invoiceDate,
18151819
itemId,
1820+
markAsPaid,
18161821
memo,
18171822
netTerms,
18181823
requireSuccessfulPayment,
@@ -1858,6 +1863,14 @@ private constructor(
18581863
*/
18591864
fun itemId(): Optional<String> = itemId.getOptional("item_id")
18601865

1866+
/**
1867+
* If true, the new credits purchase invoice will be marked as paid.
1868+
*
1869+
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if
1870+
* the server responded with an unexpected value).
1871+
*/
1872+
fun markAsPaid(): Optional<Boolean> = markAsPaid.getOptional("mark_as_paid")
1873+
18611874
/**
18621875
* An optional memo to display on the invoice.
18631876
*
@@ -1926,6 +1939,16 @@ private constructor(
19261939
*/
19271940
@JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField<String> = itemId
19281941

1942+
/**
1943+
* Returns the raw JSON value of [markAsPaid].
1944+
*
1945+
* Unlike [markAsPaid], this method doesn't throw if the JSON field has an
1946+
* unexpected type.
1947+
*/
1948+
@JsonProperty("mark_as_paid")
1949+
@ExcludeMissing
1950+
fun _markAsPaid(): JsonField<Boolean> = markAsPaid
1951+
19291952
/**
19301953
* Returns the raw JSON value of [memo].
19311954
*
@@ -1986,6 +2009,7 @@ private constructor(
19862009
private var customDueDate: JsonField<CustomDueDate> = JsonMissing.of()
19872010
private var invoiceDate: JsonField<InvoiceDate> = JsonMissing.of()
19882011
private var itemId: JsonField<String> = JsonMissing.of()
2012+
private var markAsPaid: JsonField<Boolean> = JsonMissing.of()
19892013
private var memo: JsonField<String> = JsonMissing.of()
19902014
private var netTerms: JsonField<Long> = JsonMissing.of()
19912015
private var requireSuccessfulPayment: JsonField<Boolean> = JsonMissing.of()
@@ -1997,6 +2021,7 @@ private constructor(
19972021
customDueDate = invoiceSettings.customDueDate
19982022
invoiceDate = invoiceSettings.invoiceDate
19992023
itemId = invoiceSettings.itemId
2024+
markAsPaid = invoiceSettings.markAsPaid
20002025
memo = invoiceSettings.memo
20012026
netTerms = invoiceSettings.netTerms
20022027
requireSuccessfulPayment = invoiceSettings.requireSuccessfulPayment
@@ -2102,6 +2127,20 @@ private constructor(
21022127
*/
21032128
fun itemId(itemId: JsonField<String>) = apply { this.itemId = itemId }
21042129

2130+
/** If true, the new credits purchase invoice will be marked as paid. */
2131+
fun markAsPaid(markAsPaid: Boolean) = markAsPaid(JsonField.of(markAsPaid))
2132+
2133+
/**
2134+
* Sets [Builder.markAsPaid] to an arbitrary JSON value.
2135+
*
2136+
* You should usually call [Builder.markAsPaid] with a well-typed [Boolean]
2137+
* value instead. This method is primarily for setting the field to an
2138+
* undocumented or not yet supported value.
2139+
*/
2140+
fun markAsPaid(markAsPaid: JsonField<Boolean>) = apply {
2141+
this.markAsPaid = markAsPaid
2142+
}
2143+
21052144
/** An optional memo to display on the invoice. */
21062145
fun memo(memo: String?) = memo(JsonField.ofNullable(memo))
21072146

@@ -2205,6 +2244,7 @@ private constructor(
22052244
customDueDate,
22062245
invoiceDate,
22072246
itemId,
2247+
markAsPaid,
22082248
memo,
22092249
netTerms,
22102250
requireSuccessfulPayment,
@@ -2223,6 +2263,7 @@ private constructor(
22232263
customDueDate().ifPresent { it.validate() }
22242264
invoiceDate().ifPresent { it.validate() }
22252265
itemId()
2266+
markAsPaid()
22262267
memo()
22272268
netTerms()
22282269
requireSuccessfulPayment()
@@ -2249,6 +2290,7 @@ private constructor(
22492290
(customDueDate.asKnown().getOrNull()?.validity() ?: 0) +
22502291
(invoiceDate.asKnown().getOrNull()?.validity() ?: 0) +
22512292
(if (itemId.asKnown().isPresent) 1 else 0) +
2293+
(if (markAsPaid.asKnown().isPresent) 1 else 0) +
22522294
(if (memo.asKnown().isPresent) 1 else 0) +
22532295
(if (netTerms.asKnown().isPresent) 1 else 0) +
22542296
(if (requireSuccessfulPayment.asKnown().isPresent) 1 else 0)
@@ -2624,6 +2666,7 @@ private constructor(
26242666
customDueDate == other.customDueDate &&
26252667
invoiceDate == other.invoiceDate &&
26262668
itemId == other.itemId &&
2669+
markAsPaid == other.markAsPaid &&
26272670
memo == other.memo &&
26282671
netTerms == other.netTerms &&
26292672
requireSuccessfulPayment == other.requireSuccessfulPayment &&
@@ -2636,6 +2679,7 @@ private constructor(
26362679
customDueDate,
26372680
invoiceDate,
26382681
itemId,
2682+
markAsPaid,
26392683
memo,
26402684
netTerms,
26412685
requireSuccessfulPayment,
@@ -2646,7 +2690,7 @@ private constructor(
26462690
override fun hashCode(): Int = hashCode
26472691

26482692
override fun toString() =
2649-
"InvoiceSettings{autoCollection=$autoCollection, customDueDate=$customDueDate, invoiceDate=$invoiceDate, itemId=$itemId, memo=$memo, netTerms=$netTerms, requireSuccessfulPayment=$requireSuccessfulPayment, additionalProperties=$additionalProperties}"
2693+
"InvoiceSettings{autoCollection=$autoCollection, customDueDate=$customDueDate, invoiceDate=$invoiceDate, itemId=$itemId, markAsPaid=$markAsPaid, memo=$memo, netTerms=$netTerms, requireSuccessfulPayment=$requireSuccessfulPayment, additionalProperties=$additionalProperties}"
26502694
}
26512695

26522696
/**

orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryByExternalIdParamsTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ internal class CustomerCreditLedgerCreateEntryByExternalIdParamsTest {
4747
.customDueDate(LocalDate.parse("2019-12-27"))
4848
.invoiceDate(LocalDate.parse("2019-12-27"))
4949
.itemId("item_id")
50+
.markAsPaid(true)
5051
.memo("memo")
5152
.netTerms(0L)
5253
.requireSuccessfulPayment(true)
@@ -115,6 +116,7 @@ internal class CustomerCreditLedgerCreateEntryByExternalIdParamsTest {
115116
.customDueDate(LocalDate.parse("2019-12-27"))
116117
.invoiceDate(LocalDate.parse("2019-12-27"))
117118
.itemId("item_id")
119+
.markAsPaid(true)
118120
.memo("memo")
119121
.netTerms(0L)
120122
.requireSuccessfulPayment(true)
@@ -169,6 +171,7 @@ internal class CustomerCreditLedgerCreateEntryByExternalIdParamsTest {
169171
.customDueDate(LocalDate.parse("2019-12-27"))
170172
.invoiceDate(LocalDate.parse("2019-12-27"))
171173
.itemId("item_id")
174+
.markAsPaid(true)
172175
.memo("memo")
173176
.netTerms(0L)
174177
.requireSuccessfulPayment(true)

orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryParamsTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ internal class CustomerCreditLedgerCreateEntryParamsTest {
4141
.customDueDate(LocalDate.parse("2019-12-27"))
4242
.invoiceDate(LocalDate.parse("2019-12-27"))
4343
.itemId("item_id")
44+
.markAsPaid(true)
4445
.memo("memo")
4546
.netTerms(0L)
4647
.requireSuccessfulPayment(true)
@@ -104,6 +105,7 @@ internal class CustomerCreditLedgerCreateEntryParamsTest {
104105
.customDueDate(LocalDate.parse("2019-12-27"))
105106
.invoiceDate(LocalDate.parse("2019-12-27"))
106107
.itemId("item_id")
108+
.markAsPaid(true)
107109
.memo("memo")
108110
.netTerms(0L)
109111
.requireSuccessfulPayment(true)
@@ -152,6 +154,7 @@ internal class CustomerCreditLedgerCreateEntryParamsTest {
152154
.customDueDate(LocalDate.parse("2019-12-27"))
153155
.invoiceDate(LocalDate.parse("2019-12-27"))
154156
.itemId("item_id")
157+
.markAsPaid(true)
155158
.memo("memo")
156159
.netTerms(0L)
157160
.requireSuccessfulPayment(true)

orb-java-core/src/test/kotlin/com/withorb/api/services/async/customers/credits/LedgerServiceAsyncTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ internal class LedgerServiceAsyncTest {
7373
.customDueDate(LocalDate.parse("2019-12-27"))
7474
.invoiceDate(LocalDate.parse("2019-12-27"))
7575
.itemId("item_id")
76+
.markAsPaid(true)
7677
.memo("memo")
7778
.netTerms(0L)
7879
.requireSuccessfulPayment(true)
@@ -143,6 +144,7 @@ internal class LedgerServiceAsyncTest {
143144
.customDueDate(LocalDate.parse("2019-12-27"))
144145
.invoiceDate(LocalDate.parse("2019-12-27"))
145146
.itemId("item_id")
147+
.markAsPaid(true)
146148
.memo("memo")
147149
.netTerms(0L)
148150
.requireSuccessfulPayment(true)

0 commit comments

Comments
 (0)