Skip to content

Commit 614dfad

Browse files
feat(api): api update
1 parent ecdbbd4 commit 614dfad

File tree

4 files changed

+56
-6
lines changed

4 files changed

+56
-6
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-d7b617958673f6e5b94781a63ed79caed27014e5ca8bbf7e5e31b8f4d135aecb.yml
3-
openapi_spec_hash: 66e9c2cd22385eed3ed507ee60aed4f5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d631cebb768659e659427b08c22243b7993936c24214eb1fc837e172c11012c2.yml
3+
openapi_spec_hash: e025faa481e0ca183949cd81548197bf
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4085,9 +4085,12 @@ private constructor(
40854085
fun creditsApplied(): String = creditsApplied.getRequired("credits_applied")
40864086

40874087
/**
4088+
* This field is deprecated in favor of `adjustments`
4089+
*
40884090
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
40894091
* server responded with an unexpected value).
40904092
*/
4093+
@Deprecated("deprecated")
40914094
fun discount(): Optional<Discount> = discount.getOptional("discount")
40924095

40934096
/**
@@ -4283,7 +4286,10 @@ private constructor(
42834286
*
42844287
* Unlike [discount], this method doesn't throw if the JSON field has an unexpected type.
42854288
*/
4286-
@JsonProperty("discount") @ExcludeMissing fun _discount(): JsonField<Discount> = discount
4289+
@Deprecated("deprecated")
4290+
@JsonProperty("discount")
4291+
@ExcludeMissing
4292+
fun _discount(): JsonField<Discount> = discount
42874293

42884294
/**
42894295
* Returns the raw JSON value of [endDate].
@@ -4643,9 +4649,12 @@ private constructor(
46434649
this.creditsApplied = creditsApplied
46444650
}
46454651

4652+
/** This field is deprecated in favor of `adjustments` */
4653+
@Deprecated("deprecated")
46464654
fun discount(discount: Discount?) = discount(JsonField.ofNullable(discount))
46474655

46484656
/** Alias for calling [Builder.discount] with `discount.orElse(null)`. */
4657+
@Deprecated("deprecated")
46494658
fun discount(discount: Optional<Discount>) = discount(discount.getOrNull())
46504659

46514660
/**
@@ -4655,9 +4664,11 @@ private constructor(
46554664
* instead. This method is primarily for setting the field to an undocumented or not yet
46564665
* supported value.
46574666
*/
4667+
@Deprecated("deprecated")
46584668
fun discount(discount: JsonField<Discount>) = apply { this.discount = discount }
46594669

46604670
/** Alias for calling [discount] with `Discount.ofPercentage(percentage)`. */
4671+
@Deprecated("deprecated")
46614672
fun discount(percentage: PercentageDiscount) =
46624673
discount(Discount.ofPercentage(percentage))
46634674

@@ -4670,6 +4681,7 @@ private constructor(
46704681
* .build()
46714682
* ```
46724683
*/
4684+
@Deprecated("deprecated")
46734685
fun percentageDiscount(percentageDiscount: Double) =
46744686
discount(
46754687
PercentageDiscount.builder()
@@ -4679,9 +4691,11 @@ private constructor(
46794691
)
46804692

46814693
/** Alias for calling [discount] with `Discount.ofTrial(trial)`. */
4694+
@Deprecated("deprecated")
46824695
fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial))
46834696

46844697
/** Alias for calling [discount] with `Discount.ofUsage(usage)`. */
4698+
@Deprecated("deprecated")
46854699
fun discount(usage: UsageDiscount) = discount(Discount.ofUsage(usage))
46864700

46874701
/**
@@ -4693,6 +4707,7 @@ private constructor(
46934707
* .build()
46944708
* ```
46954709
*/
4710+
@Deprecated("deprecated")
46964711
fun usageDiscount(usageDiscount: Double) =
46974712
discount(
46984713
UsageDiscount.builder()
@@ -4702,6 +4717,7 @@ private constructor(
47024717
)
47034718

47044719
/** Alias for calling [discount] with `Discount.ofAmount(amount)`. */
4720+
@Deprecated("deprecated")
47054721
fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount))
47064722

47074723
/**
@@ -4713,6 +4729,7 @@ private constructor(
47134729
* .build()
47144730
* ```
47154731
*/
4732+
@Deprecated("deprecated")
47164733
fun amountDiscount(amountDiscount: String) =
47174734
discount(
47184735
AmountDiscount.builder()

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4079,9 +4079,12 @@ private constructor(
40794079
fun creditsApplied(): String = creditsApplied.getRequired("credits_applied")
40804080

40814081
/**
4082+
* This field is deprecated in favor of `adjustments`
4083+
*
40824084
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
40834085
* server responded with an unexpected value).
40844086
*/
4087+
@Deprecated("deprecated")
40854088
fun discount(): Optional<Discount> = discount.getOptional("discount")
40864089

40874090
/**
@@ -4277,7 +4280,10 @@ private constructor(
42774280
*
42784281
* Unlike [discount], this method doesn't throw if the JSON field has an unexpected type.
42794282
*/
4280-
@JsonProperty("discount") @ExcludeMissing fun _discount(): JsonField<Discount> = discount
4283+
@Deprecated("deprecated")
4284+
@JsonProperty("discount")
4285+
@ExcludeMissing
4286+
fun _discount(): JsonField<Discount> = discount
42814287

42824288
/**
42834289
* Returns the raw JSON value of [endDate].
@@ -4637,9 +4643,12 @@ private constructor(
46374643
this.creditsApplied = creditsApplied
46384644
}
46394645

4646+
/** This field is deprecated in favor of `adjustments` */
4647+
@Deprecated("deprecated")
46404648
fun discount(discount: Discount?) = discount(JsonField.ofNullable(discount))
46414649

46424650
/** Alias for calling [Builder.discount] with `discount.orElse(null)`. */
4651+
@Deprecated("deprecated")
46434652
fun discount(discount: Optional<Discount>) = discount(discount.getOrNull())
46444653

46454654
/**
@@ -4649,9 +4658,11 @@ private constructor(
46494658
* instead. This method is primarily for setting the field to an undocumented or not yet
46504659
* supported value.
46514660
*/
4661+
@Deprecated("deprecated")
46524662
fun discount(discount: JsonField<Discount>) = apply { this.discount = discount }
46534663

46544664
/** Alias for calling [discount] with `Discount.ofPercentage(percentage)`. */
4665+
@Deprecated("deprecated")
46554666
fun discount(percentage: PercentageDiscount) =
46564667
discount(Discount.ofPercentage(percentage))
46574668

@@ -4664,6 +4675,7 @@ private constructor(
46644675
* .build()
46654676
* ```
46664677
*/
4678+
@Deprecated("deprecated")
46674679
fun percentageDiscount(percentageDiscount: Double) =
46684680
discount(
46694681
PercentageDiscount.builder()
@@ -4673,9 +4685,11 @@ private constructor(
46734685
)
46744686

46754687
/** Alias for calling [discount] with `Discount.ofTrial(trial)`. */
4688+
@Deprecated("deprecated")
46764689
fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial))
46774690

46784691
/** Alias for calling [discount] with `Discount.ofUsage(usage)`. */
4692+
@Deprecated("deprecated")
46794693
fun discount(usage: UsageDiscount) = discount(Discount.ofUsage(usage))
46804694

46814695
/**
@@ -4687,6 +4701,7 @@ private constructor(
46874701
* .build()
46884702
* ```
46894703
*/
4704+
@Deprecated("deprecated")
46904705
fun usageDiscount(usageDiscount: Double) =
46914706
discount(
46924707
UsageDiscount.builder()
@@ -4696,6 +4711,7 @@ private constructor(
46964711
)
46974712

46984713
/** Alias for calling [discount] with `Discount.ofAmount(amount)`. */
4714+
@Deprecated("deprecated")
46994715
fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount))
47004716

47014717
/**
@@ -4707,6 +4723,7 @@ private constructor(
47074723
* .build()
47084724
* ```
47094725
*/
4726+
@Deprecated("deprecated")
47104727
fun amountDiscount(amountDiscount: String) =
47114728
discount(
47124729
AmountDiscount.builder()

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ private constructor(
174174
fun creditsApplied(): String = creditsApplied.getRequired("credits_applied")
175175

176176
/**
177+
* This field is deprecated in favor of `adjustments`
178+
*
177179
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
178180
* responded with an unexpected value).
179181
*/
180-
fun discount(): Optional<Discount> = discount.getOptional("discount")
182+
@Deprecated("deprecated") fun discount(): Optional<Discount> = discount.getOptional("discount")
181183

182184
/**
183185
* The end date of the range of time applied for this line item's price.
@@ -370,7 +372,10 @@ private constructor(
370372
*
371373
* Unlike [discount], this method doesn't throw if the JSON field has an unexpected type.
372374
*/
373-
@JsonProperty("discount") @ExcludeMissing fun _discount(): JsonField<Discount> = discount
375+
@Deprecated("deprecated")
376+
@JsonProperty("discount")
377+
@ExcludeMissing
378+
fun _discount(): JsonField<Discount> = discount
374379

375380
/**
376381
* Returns the raw JSON value of [endDate].
@@ -720,9 +725,12 @@ private constructor(
720725
this.creditsApplied = creditsApplied
721726
}
722727

728+
/** This field is deprecated in favor of `adjustments` */
729+
@Deprecated("deprecated")
723730
fun discount(discount: Discount?) = discount(JsonField.ofNullable(discount))
724731

725732
/** Alias for calling [Builder.discount] with `discount.orElse(null)`. */
733+
@Deprecated("deprecated")
726734
fun discount(discount: Optional<Discount>) = discount(discount.getOrNull())
727735

728736
/**
@@ -732,9 +740,11 @@ private constructor(
732740
* This method is primarily for setting the field to an undocumented or not yet supported
733741
* value.
734742
*/
743+
@Deprecated("deprecated")
735744
fun discount(discount: JsonField<Discount>) = apply { this.discount = discount }
736745

737746
/** Alias for calling [discount] with `Discount.ofPercentage(percentage)`. */
747+
@Deprecated("deprecated")
738748
fun discount(percentage: PercentageDiscount) = discount(Discount.ofPercentage(percentage))
739749

740750
/**
@@ -746,6 +756,7 @@ private constructor(
746756
* .build()
747757
* ```
748758
*/
759+
@Deprecated("deprecated")
749760
fun percentageDiscount(percentageDiscount: Double) =
750761
discount(
751762
PercentageDiscount.builder()
@@ -755,9 +766,11 @@ private constructor(
755766
)
756767

757768
/** Alias for calling [discount] with `Discount.ofTrial(trial)`. */
769+
@Deprecated("deprecated")
758770
fun discount(trial: TrialDiscount) = discount(Discount.ofTrial(trial))
759771

760772
/** Alias for calling [discount] with `Discount.ofUsage(usage)`. */
773+
@Deprecated("deprecated")
761774
fun discount(usage: UsageDiscount) = discount(Discount.ofUsage(usage))
762775

763776
/**
@@ -769,6 +782,7 @@ private constructor(
769782
* .build()
770783
* ```
771784
*/
785+
@Deprecated("deprecated")
772786
fun usageDiscount(usageDiscount: Double) =
773787
discount(
774788
UsageDiscount.builder()
@@ -778,6 +792,7 @@ private constructor(
778792
)
779793

780794
/** Alias for calling [discount] with `Discount.ofAmount(amount)`. */
795+
@Deprecated("deprecated")
781796
fun discount(amount: AmountDiscount) = discount(Discount.ofAmount(amount))
782797

783798
/**
@@ -789,6 +804,7 @@ private constructor(
789804
* .build()
790805
* ```
791806
*/
807+
@Deprecated("deprecated")
792808
fun amountDiscount(amountDiscount: String) =
793809
discount(
794810
AmountDiscount.builder()

0 commit comments

Comments
 (0)