Skip to content

Commit 9eba618

Browse files
feat(api): api update
1 parent 88917ff commit 9eba618

File tree

5 files changed

+70
-64
lines changed

5 files changed

+70
-64
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: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e79a36262fa3c577305a43717398fb70482bb2dca47cdb3e201cbb2a590c359c.yml
3-
openapi_spec_hash: 1e04880dccbcc082ba451083e421a471
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml
3+
openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

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

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ private constructor(
6969
fun reason(): Reason = body.reason()
7070

7171
/**
72-
* An optional date string to specify the global credit note service period end date in the
73-
* customer's timezone. This will be applied to all line items. If not provided, line items will
74-
* use their original invoice line item service periods. This date is inclusive.
72+
* A date string to specify the global credit note service period end date in the customer's
73+
* timezone. This will be applied to all line items that don't have their own individual service
74+
* periods specified. If not provided, line items will use their original invoice line item
75+
* service periods. This date is inclusive.
7576
*
7677
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
7778
* responded with an unexpected value).
@@ -87,9 +88,10 @@ private constructor(
8788
fun memo(): Optional<String> = body.memo()
8889

8990
/**
90-
* An optional date string to specify the global credit note service period end date in the
91-
* customer's timezone. This will be applied to all line items. If not provided, line items will
92-
* use their original invoice line item service periods. This date is inclusive.
91+
* A date string to specify the global credit note service period start date in the customer's
92+
* timezone. This will be applied to all line items that don't have their own individual service
93+
* periods specified. If not provided, line items will use their original invoice line item
94+
* service periods. This date is inclusive.
9395
*
9496
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
9597
* responded with an unexpected value).
@@ -211,9 +213,10 @@ private constructor(
211213
fun reason(reason: JsonField<Reason>) = apply { body.reason(reason) }
212214

213215
/**
214-
* An optional date string to specify the global credit note service period end date in the
215-
* customer's timezone. This will be applied to all line items. If not provided, line items
216-
* will use their original invoice line item service periods. This date is inclusive.
216+
* A date string to specify the global credit note service period end date in the customer's
217+
* timezone. This will be applied to all line items that don't have their own individual
218+
* service periods specified. If not provided, line items will use their original invoice
219+
* line item service periods. This date is inclusive.
217220
*/
218221
fun endDate(endDate: LocalDate?) = apply { body.endDate(endDate) }
219222

@@ -244,9 +247,10 @@ private constructor(
244247
fun memo(memo: JsonField<String>) = apply { body.memo(memo) }
245248

246249
/**
247-
* An optional date string to specify the global credit note service period end date in the
248-
* customer's timezone. This will be applied to all line items. If not provided, line items
249-
* will use their original invoice line item service periods. This date is inclusive.
250+
* A date string to specify the global credit note service period start date in the
251+
* customer's timezone. This will be applied to all line items that don't have their own
252+
* individual service periods specified. If not provided, line items will use their original
253+
* invoice line item service periods. This date is inclusive.
250254
*/
251255
fun startDate(startDate: LocalDate?) = apply { body.startDate(startDate) }
252256

@@ -446,9 +450,10 @@ private constructor(
446450
fun reason(): Reason = reason.getRequired("reason")
447451

448452
/**
449-
* An optional date string to specify the global credit note service period end date in the
450-
* customer's timezone. This will be applied to all line items. If not provided, line items
451-
* will use their original invoice line item service periods. This date is inclusive.
453+
* A date string to specify the global credit note service period end date in the customer's
454+
* timezone. This will be applied to all line items that don't have their own individual
455+
* service periods specified. If not provided, line items will use their original invoice
456+
* line item service periods. This date is inclusive.
452457
*
453458
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
454459
* server responded with an unexpected value).
@@ -464,9 +469,10 @@ private constructor(
464469
fun memo(): Optional<String> = memo.getOptional("memo")
465470

466471
/**
467-
* An optional date string to specify the global credit note service period end date in the
468-
* customer's timezone. This will be applied to all line items. If not provided, line items
469-
* will use their original invoice line item service periods. This date is inclusive.
472+
* A date string to specify the global credit note service period start date in the
473+
* customer's timezone. This will be applied to all line items that don't have their own
474+
* individual service periods specified. If not provided, line items will use their original
475+
* invoice line item service periods. This date is inclusive.
470476
*
471477
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
472478
* server responded with an unexpected value).
@@ -596,10 +602,10 @@ private constructor(
596602
fun reason(reason: JsonField<Reason>) = apply { this.reason = reason }
597603

598604
/**
599-
* An optional date string to specify the global credit note service period end date in
600-
* the customer's timezone. This will be applied to all line items. If not provided,
601-
* line items will use their original invoice line item service periods. This date is
602-
* inclusive.
605+
* A date string to specify the global credit note service period end date in the
606+
* customer's timezone. This will be applied to all line items that don't have their own
607+
* individual service periods specified. If not provided, line items will use their
608+
* original invoice line item service periods. This date is inclusive.
603609
*/
604610
fun endDate(endDate: LocalDate?) = endDate(JsonField.ofNullable(endDate))
605611

@@ -631,10 +637,10 @@ private constructor(
631637
fun memo(memo: JsonField<String>) = apply { this.memo = memo }
632638

633639
/**
634-
* An optional date string to specify the global credit note service period end date in
635-
* the customer's timezone. This will be applied to all line items. If not provided,
636-
* line items will use their original invoice line item service periods. This date is
637-
* inclusive.
640+
* A date string to specify the global credit note service period start date in the
641+
* customer's timezone. This will be applied to all line items that don't have their own
642+
* individual service periods specified. If not provided, line items will use their
643+
* original invoice line item service periods. This date is inclusive.
638644
*/
639645
fun startDate(startDate: LocalDate?) = startDate(JsonField.ofNullable(startDate))
640646

@@ -788,21 +794,21 @@ private constructor(
788794
fun invoiceLineItemId(): String = invoiceLineItemId.getRequired("invoice_line_item_id")
789795

790796
/**
791-
* An optional date string to specify this line item's credit note service period end date
792-
* in the customer's timezone. If provided, this will be used for this specific line item.
793-
* If not provided, will use the global end_date if available, otherwise defaults to the
794-
* original invoice line item's end date. This date is inclusive.
797+
* A date string to specify this line item's credit note service period end date in the
798+
* customer's timezone. If provided, this will be used for this specific line item. If not
799+
* provided, will use the global end_date if available, otherwise defaults to the original
800+
* invoice line item's end date. This date is inclusive.
795801
*
796802
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
797803
* server responded with an unexpected value).
798804
*/
799805
fun endDate(): Optional<LocalDate> = endDate.getOptional("end_date")
800806

801807
/**
802-
* An optional date string to specify this line item's credit note service period start date
803-
* in the customer's timezone. If provided, this will be used for this specific line item.
804-
* If not provided, will use the global start_date if available, otherwise defaults to the
805-
* original invoice line item's start date. This date is inclusive.
808+
* A date string to specify this line item's credit note service period start date in the
809+
* customer's timezone. If provided, this will be used for this specific line item. If not
810+
* provided, will use the global start_date if available, otherwise defaults to the original
811+
* invoice line item's start date. This date is inclusive.
806812
*
807813
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
808814
* server responded with an unexpected value).
@@ -914,10 +920,10 @@ private constructor(
914920
}
915921

916922
/**
917-
* An optional date string to specify this line item's credit note service period end
918-
* date in the customer's timezone. If provided, this will be used for this specific
919-
* line item. If not provided, will use the global end_date if available, otherwise
920-
* defaults to the original invoice line item's end date. This date is inclusive.
923+
* A date string to specify this line item's credit note service period end date in the
924+
* customer's timezone. If provided, this will be used for this specific line item. If
925+
* not provided, will use the global end_date if available, otherwise defaults to the
926+
* original invoice line item's end date. This date is inclusive.
921927
*/
922928
fun endDate(endDate: LocalDate?) = endDate(JsonField.ofNullable(endDate))
923929

@@ -934,10 +940,10 @@ private constructor(
934940
fun endDate(endDate: JsonField<LocalDate>) = apply { this.endDate = endDate }
935941

936942
/**
937-
* An optional date string to specify this line item's credit note service period start
938-
* date in the customer's timezone. If provided, this will be used for this specific
939-
* line item. If not provided, will use the global start_date if available, otherwise
940-
* defaults to the original invoice line item's start date. This date is inclusive.
943+
* A date string to specify this line item's credit note service period start date in
944+
* the customer's timezone. If provided, this will be used for this specific line item.
945+
* If not provided, will use the global start_date if available, otherwise defaults to
946+
* the original invoice line item's start date. This date is inclusive.
941947
*/
942948
fun startDate(startDate: LocalDate?) = startDate(JsonField.ofNullable(startDate))
943949

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ internal class CreditNoteCreateParamsTest {
1515
CreditNoteCreateParams.LineItem.builder()
1616
.amount("amount")
1717
.invoiceLineItemId("4khy3nwzktxv7")
18-
.endDate(LocalDate.parse("2023-01-31"))
19-
.startDate(LocalDate.parse("2023-01-01"))
18+
.endDate(LocalDate.parse("2023-09-22"))
19+
.startDate(LocalDate.parse("2023-09-22"))
2020
.build()
2121
)
2222
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
23-
.endDate(LocalDate.parse("2023-01-31"))
23+
.endDate(LocalDate.parse("2023-09-22"))
2424
.memo("An optional memo for my credit note.")
25-
.startDate(LocalDate.parse("2023-01-01"))
25+
.startDate(LocalDate.parse("2023-09-22"))
2626
.build()
2727
}
2828

@@ -34,14 +34,14 @@ internal class CreditNoteCreateParamsTest {
3434
CreditNoteCreateParams.LineItem.builder()
3535
.amount("amount")
3636
.invoiceLineItemId("4khy3nwzktxv7")
37-
.endDate(LocalDate.parse("2023-01-31"))
38-
.startDate(LocalDate.parse("2023-01-01"))
37+
.endDate(LocalDate.parse("2023-09-22"))
38+
.startDate(LocalDate.parse("2023-09-22"))
3939
.build()
4040
)
4141
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
42-
.endDate(LocalDate.parse("2023-01-31"))
42+
.endDate(LocalDate.parse("2023-09-22"))
4343
.memo("An optional memo for my credit note.")
44-
.startDate(LocalDate.parse("2023-01-01"))
44+
.startDate(LocalDate.parse("2023-09-22"))
4545
.build()
4646

4747
val body = params._body()
@@ -51,14 +51,14 @@ internal class CreditNoteCreateParamsTest {
5151
CreditNoteCreateParams.LineItem.builder()
5252
.amount("amount")
5353
.invoiceLineItemId("4khy3nwzktxv7")
54-
.endDate(LocalDate.parse("2023-01-31"))
55-
.startDate(LocalDate.parse("2023-01-01"))
54+
.endDate(LocalDate.parse("2023-09-22"))
55+
.startDate(LocalDate.parse("2023-09-22"))
5656
.build()
5757
)
5858
assertThat(body.reason()).isEqualTo(CreditNoteCreateParams.Reason.DUPLICATE)
59-
assertThat(body.endDate()).contains(LocalDate.parse("2023-01-31"))
59+
assertThat(body.endDate()).contains(LocalDate.parse("2023-09-22"))
6060
assertThat(body.memo()).contains("An optional memo for my credit note.")
61-
assertThat(body.startDate()).contains(LocalDate.parse("2023-01-01"))
61+
assertThat(body.startDate()).contains(LocalDate.parse("2023-09-22"))
6262
}
6363

6464
@Test

orb-java-core/src/test/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ internal class CreditNoteServiceAsyncTest {
2828
CreditNoteCreateParams.LineItem.builder()
2929
.amount("amount")
3030
.invoiceLineItemId("4khy3nwzktxv7")
31-
.endDate(LocalDate.parse("2023-01-31"))
32-
.startDate(LocalDate.parse("2023-01-01"))
31+
.endDate(LocalDate.parse("2023-09-22"))
32+
.startDate(LocalDate.parse("2023-09-22"))
3333
.build()
3434
)
3535
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
36-
.endDate(LocalDate.parse("2023-01-31"))
36+
.endDate(LocalDate.parse("2023-09-22"))
3737
.memo("An optional memo for my credit note.")
38-
.startDate(LocalDate.parse("2023-01-01"))
38+
.startDate(LocalDate.parse("2023-09-22"))
3939
.build()
4040
)
4141

orb-java-core/src/test/kotlin/com/withorb/api/services/blocking/CreditNoteServiceTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ internal class CreditNoteServiceTest {
2828
CreditNoteCreateParams.LineItem.builder()
2929
.amount("amount")
3030
.invoiceLineItemId("4khy3nwzktxv7")
31-
.endDate(LocalDate.parse("2023-01-31"))
32-
.startDate(LocalDate.parse("2023-01-01"))
31+
.endDate(LocalDate.parse("2023-09-22"))
32+
.startDate(LocalDate.parse("2023-09-22"))
3333
.build()
3434
)
3535
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
36-
.endDate(LocalDate.parse("2023-01-31"))
36+
.endDate(LocalDate.parse("2023-09-22"))
3737
.memo("An optional memo for my credit note.")
38-
.startDate(LocalDate.parse("2023-01-01"))
38+
.startDate(LocalDate.parse("2023-09-22"))
3939
.build()
4040
)
4141

0 commit comments

Comments
 (0)