Skip to content

Commit ebf0a3e

Browse files
refactor(client): make unions implement ModelBase
1 parent f6cc928 commit ebf0a3e

File tree

117 files changed

+507
-486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+507
-486
lines changed

src/Orb/Core/ModelBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Orb.Core;
2727
/// <summary>
2828
/// The base class for all API objects with properties.
2929
///
30-
/// <para>API objects such as enums and unions do not inherit from this class.</para>
30+
/// <para>API objects such as enums do not inherit from this class.</para>
3131
/// </summary>
3232
public abstract record class ModelBase
3333
{

src/Orb/Models/AdjustmentInterval.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public AdjustmentInterval FromRawUnchecked(IReadOnlyDictionary<string, JsonEleme
108108
}
109109

110110
[JsonConverter(typeof(AdjustmentConverter))]
111-
public record class Adjustment
111+
public record class Adjustment : ModelBase
112112
{
113113
public object? Value { get; } = null;
114114

@@ -454,7 +454,7 @@ public static implicit operator Adjustment(PlanPhasePercentageDiscountAdjustment
454454
/// Thrown when the instance does not pass validation.
455455
/// </exception>
456456
/// </summary>
457-
public void Validate()
457+
public override void Validate()
458458
{
459459
if (this.Value == null)
460460
{

src/Orb/Models/Beta/BetaCreatePlanVersionParams.cs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public AddAdjustment FromRawUnchecked(IReadOnlyDictionary<string, JsonElement> r
277277
/// The definition of a new adjustment to create and add to the plan.
278278
/// </summary>
279279
[JsonConverter(typeof(global::Orb.Models.Beta.AdjustmentConverter))]
280-
public record class Adjustment
280+
public record class Adjustment : ModelBase
281281
{
282282
public object? Value { get; } = null;
283283

@@ -578,7 +578,7 @@ NewPercentageDiscount value
578578
/// Thrown when the instance does not pass validation.
579579
/// </exception>
580580
/// </summary>
581-
public void Validate()
581+
public override void Validate()
582582
{
583583
if (this.Value == null)
584584
{
@@ -829,7 +829,7 @@ public AddPrice FromRawUnchecked(IReadOnlyDictionary<string, JsonElement> rawDat
829829
/// New plan price request body params.
830830
/// </summary>
831831
[JsonConverter(typeof(global::Orb.Models.Beta.PriceConverter))]
832-
public record class Price
832+
public record class Price : ModelBase
833833
{
834834
public object? Value { get; } = null;
835835

@@ -2710,7 +2710,7 @@ NewPlanMinimumCompositePrice value
27102710
/// Thrown when the instance does not pass validation.
27112711
/// </exception>
27122712
/// </summary>
2713-
public void Validate()
2713+
public override void Validate()
27142714
{
27152715
if (this.Value == null)
27162716
{
@@ -4088,7 +4088,7 @@ JsonSerializerOptions options
40884088
}
40894089

40904090
[JsonConverter(typeof(global::Orb.Models.Beta.ConversionRateConfigConverter))]
4091-
public record class ConversionRateConfig
4091+
public record class ConversionRateConfig : ModelBase
40924092
{
40934093
public object? Value { get; } = null;
40944094

@@ -4252,7 +4252,7 @@ SharedTieredConversionRateConfig value
42524252
/// Thrown when the instance does not pass validation.
42534253
/// </exception>
42544254
/// </summary>
4255-
public void Validate()
4255+
public override void Validate()
42564256
{
42574257
if (this.Value == null)
42584258
{
@@ -4866,7 +4866,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
48664866
}
48674867

48684868
[JsonConverter(typeof(global::Orb.Models.Beta.TieredWithProrationConversionRateConfigConverter))]
4869-
public record class TieredWithProrationConversionRateConfig
4869+
public record class TieredWithProrationConversionRateConfig : ModelBase
48704870
{
48714871
public object? Value { get; } = null;
48724872

@@ -5036,7 +5036,7 @@ SharedTieredConversionRateConfig value
50365036
/// Thrown when the instance does not pass validation.
50375037
/// </exception>
50385038
/// </summary>
5039-
public void Validate()
5039+
public override void Validate()
50405040
{
50415041
if (this.Value == null)
50425042
{
@@ -5603,7 +5603,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
56035603
[JsonConverter(
56045604
typeof(global::Orb.Models.Beta.GroupedWithMinMaxThresholdsConversionRateConfigConverter)
56055605
)]
5606-
public record class GroupedWithMinMaxThresholdsConversionRateConfig
5606+
public record class GroupedWithMinMaxThresholdsConversionRateConfig : ModelBase
56075607
{
56085608
public object? Value { get; } = null;
56095609

@@ -5773,7 +5773,7 @@ SharedTieredConversionRateConfig value
57735773
/// Thrown when the instance does not pass validation.
57745774
/// </exception>
57755775
/// </summary>
5776-
public void Validate()
5776+
public override void Validate()
57775777
{
57785778
if (this.Value == null)
57795779
{
@@ -6342,7 +6342,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
63426342
[JsonConverter(
63436343
typeof(global::Orb.Models.Beta.CumulativeGroupedAllocationConversionRateConfigConverter)
63446344
)]
6345-
public record class CumulativeGroupedAllocationConversionRateConfig
6345+
public record class CumulativeGroupedAllocationConversionRateConfig : ModelBase
63466346
{
63476347
public object? Value { get; } = null;
63486348

@@ -6512,7 +6512,7 @@ SharedTieredConversionRateConfig value
65126512
/// Thrown when the instance does not pass validation.
65136513
/// </exception>
65146514
/// </summary>
6515-
public void Validate()
6515+
public override void Validate()
65166516
{
65176517
if (this.Value == null)
65186518
{
@@ -7041,7 +7041,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
70417041
}
70427042

70437043
[JsonConverter(typeof(global::Orb.Models.Beta.PercentConversionRateConfigConverter))]
7044-
public record class PercentConversionRateConfig
7044+
public record class PercentConversionRateConfig : ModelBase
70457045
{
70467046
public object? Value { get; } = null;
70477047

@@ -7211,7 +7211,7 @@ SharedTieredConversionRateConfig value
72117211
/// Thrown when the instance does not pass validation.
72127212
/// </exception>
72137213
/// </summary>
7214-
public void Validate()
7214+
public override void Validate()
72157215
{
72167216
if (this.Value == null)
72177217
{
@@ -7759,7 +7759,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
77597759
}
77607760

77617761
[JsonConverter(typeof(global::Orb.Models.Beta.EventOutputConversionRateConfigConverter))]
7762-
public record class EventOutputConversionRateConfig
7762+
public record class EventOutputConversionRateConfig : ModelBase
77637763
{
77647764
public object? Value { get; } = null;
77657765

@@ -7929,7 +7929,7 @@ SharedTieredConversionRateConfig value
79297929
/// Thrown when the instance does not pass validation.
79307930
/// </exception>
79317931
/// </summary>
7932-
public void Validate()
7932+
public override void Validate()
79337933
{
79347934
if (this.Value == null)
79357935
{
@@ -8255,7 +8255,7 @@ public ReplaceAdjustment FromRawUnchecked(IReadOnlyDictionary<string, JsonElemen
82558255
/// The definition of a new adjustment to create and add to the plan.
82568256
/// </summary>
82578257
[JsonConverter(typeof(ReplaceAdjustmentAdjustmentConverter))]
8258-
public record class ReplaceAdjustmentAdjustment
8258+
public record class ReplaceAdjustmentAdjustment : ModelBase
82598259
{
82608260
public object? Value { get; } = null;
82618261

@@ -8557,7 +8557,7 @@ public static implicit operator ReplaceAdjustmentAdjustment(NewAmountDiscount va
85578557
/// Thrown when the instance does not pass validation.
85588558
/// </exception>
85598559
/// </summary>
8560-
public void Validate()
8560+
public override void Validate()
85618561
{
85628562
if (this.Value == null)
85638563
{
@@ -8824,7 +8824,7 @@ public ReplacePrice FromRawUnchecked(IReadOnlyDictionary<string, JsonElement> ra
88248824
/// New plan price request body params.
88258825
/// </summary>
88268826
[JsonConverter(typeof(ReplacePricePriceConverter))]
8827-
public record class ReplacePricePrice
8827+
public record class ReplacePricePrice : ModelBase
88288828
{
88298829
public object? Value { get; } = null;
88308830

@@ -10695,7 +10695,7 @@ public static implicit operator ReplacePricePrice(ReplacePricePriceEventOutput v
1069510695
/// Thrown when the instance does not pass validation.
1069610696
/// </exception>
1069710697
/// </summary>
10698-
public void Validate()
10698+
public override void Validate()
1069910699
{
1070010700
if (this.Value == null)
1070110701
{
@@ -12095,7 +12095,7 @@ JsonSerializerOptions options
1209512095
}
1209612096

1209712097
[JsonConverter(typeof(ReplacePricePriceBulkWithFiltersConversionRateConfigConverter))]
12098-
public record class ReplacePricePriceBulkWithFiltersConversionRateConfig
12098+
public record class ReplacePricePriceBulkWithFiltersConversionRateConfig : ModelBase
1209912099
{
1210012100
public object? Value { get; } = null;
1210112101

@@ -12265,7 +12265,7 @@ SharedTieredConversionRateConfig value
1226512265
/// Thrown when the instance does not pass validation.
1226612266
/// </exception>
1226712267
/// </summary>
12268-
public void Validate()
12268+
public override void Validate()
1226912269
{
1227012270
if (this.Value == null)
1227112271
{
@@ -12892,7 +12892,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
1289212892
}
1289312893

1289412894
[JsonConverter(typeof(ReplacePricePriceTieredWithProrationConversionRateConfigConverter))]
12895-
public record class ReplacePricePriceTieredWithProrationConversionRateConfig
12895+
public record class ReplacePricePriceTieredWithProrationConversionRateConfig : ModelBase
1289612896
{
1289712897
public object? Value { get; } = null;
1289812898

@@ -13062,7 +13062,7 @@ SharedTieredConversionRateConfig value
1306213062
/// Thrown when the instance does not pass validation.
1306313063
/// </exception>
1306413064
/// </summary>
13065-
public void Validate()
13065+
public override void Validate()
1306613066
{
1306713067
if (this.Value == null)
1306813068
{
@@ -13631,7 +13631,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
1363113631
}
1363213632

1363313633
[JsonConverter(typeof(ReplacePricePriceGroupedWithMinMaxThresholdsConversionRateConfigConverter))]
13634-
public record class ReplacePricePriceGroupedWithMinMaxThresholdsConversionRateConfig
13634+
public record class ReplacePricePriceGroupedWithMinMaxThresholdsConversionRateConfig : ModelBase
1363513635
{
1363613636
public object? Value { get; } = null;
1363713637

@@ -13801,7 +13801,7 @@ SharedTieredConversionRateConfig value
1380113801
/// Thrown when the instance does not pass validation.
1380213802
/// </exception>
1380313803
/// </summary>
13804-
public void Validate()
13804+
public override void Validate()
1380513805
{
1380613806
if (this.Value == null)
1380713807
{
@@ -14374,7 +14374,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
1437414374
}
1437514375

1437614376
[JsonConverter(typeof(ReplacePricePriceCumulativeGroupedAllocationConversionRateConfigConverter))]
14377-
public record class ReplacePricePriceCumulativeGroupedAllocationConversionRateConfig
14377+
public record class ReplacePricePriceCumulativeGroupedAllocationConversionRateConfig : ModelBase
1437814378
{
1437914379
public object? Value { get; } = null;
1438014380

@@ -14544,7 +14544,7 @@ SharedTieredConversionRateConfig value
1454414544
/// Thrown when the instance does not pass validation.
1454514545
/// </exception>
1454614546
/// </summary>
14547-
public void Validate()
14547+
public override void Validate()
1454814548
{
1454914549
if (this.Value == null)
1455014550
{
@@ -15075,7 +15075,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
1507515075
}
1507615076

1507715077
[JsonConverter(typeof(ReplacePricePricePercentConversionRateConfigConverter))]
15078-
public record class ReplacePricePricePercentConversionRateConfig
15078+
public record class ReplacePricePricePercentConversionRateConfig : ModelBase
1507915079
{
1508015080
public object? Value { get; } = null;
1508115081

@@ -15245,7 +15245,7 @@ SharedTieredConversionRateConfig value
1524515245
/// Thrown when the instance does not pass validation.
1524615246
/// </exception>
1524715247
/// </summary>
15248-
public void Validate()
15248+
public override void Validate()
1524915249
{
1525015250
if (this.Value == null)
1525115251
{
@@ -15797,7 +15797,7 @@ IReadOnlyDictionary<string, JsonElement> rawData
1579715797
}
1579815798

1579915799
[JsonConverter(typeof(ReplacePricePriceEventOutputConversionRateConfigConverter))]
15800-
public record class ReplacePricePriceEventOutputConversionRateConfig
15800+
public record class ReplacePricePriceEventOutputConversionRateConfig : ModelBase
1580115801
{
1580215802
public object? Value { get; } = null;
1580315803

@@ -15967,7 +15967,7 @@ SharedTieredConversionRateConfig value
1596715967
/// Thrown when the instance does not pass validation.
1596815968
/// </exception>
1596915969
/// </summary>
15970-
public void Validate()
15970+
public override void Validate()
1597115971
{
1597215972
if (this.Value == null)
1597315973
{

0 commit comments

Comments
 (0)