Skip to content

Commit b80c170

Browse files
feat(api): api update
1 parent 52612a7 commit b80c170

File tree

5 files changed

+64
-70
lines changed

5 files changed

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

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

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

7171
/**
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.
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.
7675
*
7776
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
7877
* responded with an unexpected value).
@@ -88,10 +87,9 @@ private constructor(
8887
fun memo(): Optional<String> = body.memo()
8988

9089
/**
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.
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.
9593
*
9694
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
9795
* responded with an unexpected value).
@@ -213,10 +211,9 @@ private constructor(
213211
fun reason(reason: JsonField<Reason>) = apply { body.reason(reason) }
214212

215213
/**
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.
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.
220217
*/
221218
fun endDate(endDate: LocalDate?) = apply { body.endDate(endDate) }
222219

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

249246
/**
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.
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.
254250
*/
255251
fun startDate(startDate: LocalDate?) = apply { body.startDate(startDate) }
256252

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

452448
/**
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.
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.
457452
*
458453
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
459454
* server responded with an unexpected value).
@@ -469,10 +464,9 @@ private constructor(
469464
fun memo(): Optional<String> = memo.getOptional("memo")
470465

471466
/**
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.
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.
476470
*
477471
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
478472
* server responded with an unexpected value).
@@ -602,10 +596,10 @@ private constructor(
602596
fun reason(reason: JsonField<Reason>) = apply { this.reason = reason }
603597

604598
/**
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.
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.
609603
*/
610604
fun endDate(endDate: LocalDate?) = endDate(JsonField.ofNullable(endDate))
611605

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

639633
/**
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.
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.
644638
*/
645639
fun startDate(startDate: LocalDate?) = startDate(JsonField.ofNullable(startDate))
646640

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

796790
/**
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.
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.
801795
*
802796
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
803797
* server responded with an unexpected value).
804798
*/
805799
fun endDate(): Optional<LocalDate> = endDate.getOptional("end_date")
806800

807801
/**
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.
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.
812806
*
813807
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
814808
* server responded with an unexpected value).
@@ -920,10 +914,10 @@ private constructor(
920914
}
921915

922916
/**
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.
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.
927921
*/
928922
fun endDate(endDate: LocalDate?) = endDate(JsonField.ofNullable(endDate))
929923

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

942936
/**
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.
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.
947941
*/
948942
fun startDate(startDate: LocalDate?) = startDate(JsonField.ofNullable(startDate))
949943

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-09-22"))
19-
.startDate(LocalDate.parse("2023-09-22"))
18+
.endDate(LocalDate.parse("2023-01-31"))
19+
.startDate(LocalDate.parse("2023-01-01"))
2020
.build()
2121
)
2222
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
23-
.endDate(LocalDate.parse("2023-09-22"))
23+
.endDate(LocalDate.parse("2023-01-31"))
2424
.memo("An optional memo for my credit note.")
25-
.startDate(LocalDate.parse("2023-09-22"))
25+
.startDate(LocalDate.parse("2023-01-01"))
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-09-22"))
38-
.startDate(LocalDate.parse("2023-09-22"))
37+
.endDate(LocalDate.parse("2023-01-31"))
38+
.startDate(LocalDate.parse("2023-01-01"))
3939
.build()
4040
)
4141
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
42-
.endDate(LocalDate.parse("2023-09-22"))
42+
.endDate(LocalDate.parse("2023-01-31"))
4343
.memo("An optional memo for my credit note.")
44-
.startDate(LocalDate.parse("2023-09-22"))
44+
.startDate(LocalDate.parse("2023-01-01"))
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-09-22"))
55-
.startDate(LocalDate.parse("2023-09-22"))
54+
.endDate(LocalDate.parse("2023-01-31"))
55+
.startDate(LocalDate.parse("2023-01-01"))
5656
.build()
5757
)
5858
assertThat(body.reason()).isEqualTo(CreditNoteCreateParams.Reason.DUPLICATE)
59-
assertThat(body.endDate()).contains(LocalDate.parse("2023-09-22"))
59+
assertThat(body.endDate()).contains(LocalDate.parse("2023-01-31"))
6060
assertThat(body.memo()).contains("An optional memo for my credit note.")
61-
assertThat(body.startDate()).contains(LocalDate.parse("2023-09-22"))
61+
assertThat(body.startDate()).contains(LocalDate.parse("2023-01-01"))
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-09-22"))
32-
.startDate(LocalDate.parse("2023-09-22"))
31+
.endDate(LocalDate.parse("2023-01-31"))
32+
.startDate(LocalDate.parse("2023-01-01"))
3333
.build()
3434
)
3535
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
36-
.endDate(LocalDate.parse("2023-09-22"))
36+
.endDate(LocalDate.parse("2023-01-31"))
3737
.memo("An optional memo for my credit note.")
38-
.startDate(LocalDate.parse("2023-09-22"))
38+
.startDate(LocalDate.parse("2023-01-01"))
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-09-22"))
32-
.startDate(LocalDate.parse("2023-09-22"))
31+
.endDate(LocalDate.parse("2023-01-31"))
32+
.startDate(LocalDate.parse("2023-01-01"))
3333
.build()
3434
)
3535
.reason(CreditNoteCreateParams.Reason.DUPLICATE)
36-
.endDate(LocalDate.parse("2023-09-22"))
36+
.endDate(LocalDate.parse("2023-01-31"))
3737
.memo("An optional memo for my credit note.")
38-
.startDate(LocalDate.parse("2023-09-22"))
38+
.startDate(LocalDate.parse("2023-01-01"))
3939
.build()
4040
)
4141

0 commit comments

Comments
 (0)