Skip to content

Commit e9ab518

Browse files
feat(client): validate constant values
1 parent 3b0a9ab commit e9ab518

16 files changed

+112
-244
lines changed

src/Orb/Models/Beta/BetaCreatePlanVersionParams.cs

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3882,9 +3882,7 @@ public void Validate()
38823882
{
38833883
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType().Json))
38843884
{
3885-
throw new OrbInvalidDataException(
3886-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType'"
3887-
);
3885+
throw new OrbInvalidDataException("Invalid value given for 'ModelType'");
38883886
}
38893887
}
38903888

@@ -4706,9 +4704,7 @@ public void Validate()
47064704
{
47074705
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelTypeModel().Json))
47084706
{
4709-
throw new OrbInvalidDataException(
4710-
"Invalid constant given for 'global::Orb.Models.Beta.ModelTypeModel'"
4711-
);
4707+
throw new OrbInvalidDataException("Invalid value given for 'ModelTypeModel'");
47124708
}
47134709
}
47144710

@@ -5867,9 +5863,7 @@ public void Validate()
58675863
{
58685864
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType1().Json))
58695865
{
5870-
throw new OrbInvalidDataException(
5871-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType1'"
5872-
);
5866+
throw new OrbInvalidDataException("Invalid value given for 'ModelType1'");
58735867
}
58745868
}
58755869

@@ -6685,9 +6679,7 @@ public void Validate()
66856679
{
66866680
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType2().Json))
66876681
{
6688-
throw new OrbInvalidDataException(
6689-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType2'"
6690-
);
6682+
throw new OrbInvalidDataException("Invalid value given for 'ModelType2'");
66916683
}
66926684
}
66936685

@@ -7691,9 +7683,7 @@ public void Validate()
76917683
{
76927684
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType3().Json))
76937685
{
7694-
throw new OrbInvalidDataException(
7695-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType3'"
7696-
);
7686+
throw new OrbInvalidDataException("Invalid value given for 'ModelType3'");
76977687
}
76987688
}
76997689

@@ -11693,9 +11683,7 @@ public void Validate()
1169311683
{
1169411684
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType4().Json))
1169511685
{
11696-
throw new OrbInvalidDataException(
11697-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType4'"
11698-
);
11686+
throw new OrbInvalidDataException("Invalid value given for 'ModelType4'");
1169911687
}
1170011688
}
1170111689

@@ -12516,9 +12504,7 @@ public void Validate()
1251612504
{
1251712505
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType5().Json))
1251812506
{
12519-
throw new OrbInvalidDataException(
12520-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType5'"
12521-
);
12507+
throw new OrbInvalidDataException("Invalid value given for 'ModelType5'");
1252212508
}
1252312509
}
1252412510

@@ -13679,9 +13665,7 @@ public void Validate()
1367913665
{
1368013666
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType6().Json))
1368113667
{
13682-
throw new OrbInvalidDataException(
13683-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType6'"
13684-
);
13668+
throw new OrbInvalidDataException("Invalid value given for 'ModelType6'");
1368513669
}
1368613670
}
1368713671

@@ -14495,9 +14479,7 @@ public void Validate()
1449514479
{
1449614480
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType7().Json))
1449714481
{
14498-
throw new OrbInvalidDataException(
14499-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType7'"
14500-
);
14482+
throw new OrbInvalidDataException("Invalid value given for 'ModelType7'");
1450114483
}
1450214484
}
1450314485

@@ -15497,9 +15479,7 @@ public void Validate()
1549715479
{
1549815480
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Beta.ModelType8().Json))
1549915481
{
15500-
throw new OrbInvalidDataException(
15501-
"Invalid constant given for 'global::Orb.Models.Beta.ModelType8'"
15502-
);
15482+
throw new OrbInvalidDataException("Invalid value given for 'ModelType8'");
1550315483
}
1550415484
}
1550515485

src/Orb/Models/Beta/ExternalPlanID/ExternalPlanIDCreatePlanVersionParams.cs

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3918,9 +3918,7 @@ public void Validate()
39183918
)
39193919
)
39203920
{
3921-
throw new OrbInvalidDataException(
3922-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType'"
3923-
);
3921+
throw new OrbInvalidDataException("Invalid value given for 'ModelType'");
39243922
}
39253923
}
39263924

@@ -4752,9 +4750,7 @@ public void Validate()
47524750
)
47534751
)
47544752
{
4755-
throw new OrbInvalidDataException(
4756-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelTypeModel'"
4757-
);
4753+
throw new OrbInvalidDataException("Invalid value given for 'ModelTypeModel'");
47584754
}
47594755
}
47604756

@@ -5928,9 +5924,7 @@ public void Validate()
59285924
)
59295925
)
59305926
{
5931-
throw new OrbInvalidDataException(
5932-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType1'"
5933-
);
5927+
throw new OrbInvalidDataException("Invalid value given for 'ModelType1'");
59345928
}
59355929
}
59365930

@@ -6756,9 +6750,7 @@ public void Validate()
67566750
)
67576751
)
67586752
{
6759-
throw new OrbInvalidDataException(
6760-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType2'"
6761-
);
6753+
throw new OrbInvalidDataException("Invalid value given for 'ModelType2'");
67626754
}
67636755
}
67646756

@@ -7772,9 +7764,7 @@ public void Validate()
77727764
)
77737765
)
77747766
{
7775-
throw new OrbInvalidDataException(
7776-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType3'"
7777-
);
7767+
throw new OrbInvalidDataException("Invalid value given for 'ModelType3'");
77787768
}
77797769
}
77807770

@@ -11901,9 +11891,7 @@ public void Validate()
1190111891
)
1190211892
)
1190311893
{
11904-
throw new OrbInvalidDataException(
11905-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType4'"
11906-
);
11894+
throw new OrbInvalidDataException("Invalid value given for 'ModelType4'");
1190711895
}
1190811896
}
1190911897

@@ -12736,9 +12724,7 @@ public void Validate()
1273612724
)
1273712725
)
1273812726
{
12739-
throw new OrbInvalidDataException(
12740-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType5'"
12741-
);
12727+
throw new OrbInvalidDataException("Invalid value given for 'ModelType5'");
1274212728
}
1274312729
}
1274412730

@@ -13913,9 +13899,7 @@ public void Validate()
1391313899
)
1391413900
)
1391513901
{
13916-
throw new OrbInvalidDataException(
13917-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType6'"
13918-
);
13902+
throw new OrbInvalidDataException("Invalid value given for 'ModelType6'");
1391913903
}
1392013904
}
1392113905

@@ -14741,9 +14725,7 @@ public void Validate()
1474114725
)
1474214726
)
1474314727
{
14744-
throw new OrbInvalidDataException(
14745-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType7'"
14746-
);
14728+
throw new OrbInvalidDataException("Invalid value given for 'ModelType7'");
1474714729
}
1474814730
}
1474914731

@@ -15759,9 +15741,7 @@ public void Validate()
1575915741
)
1576015742
)
1576115743
{
15762-
throw new OrbInvalidDataException(
15763-
"Invalid constant given for 'global::Orb.Models.Beta.ExternalPlanID.ModelType8'"
15764-
);
15744+
throw new OrbInvalidDataException("Invalid value given for 'ModelType8'");
1576515745
}
1576615746
}
1576715747

src/Orb/Models/Coupons/CouponCreateParams.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,7 @@ public void Validate()
477477
{
478478
if (JsonElement.DeepEquals(this.Json, new global::Orb.Models.Coupons.DiscountType().Json))
479479
{
480-
throw new OrbInvalidDataException(
481-
"Invalid constant given for 'global::Orb.Models.Coupons.DiscountType'"
482-
);
480+
throw new OrbInvalidDataException("Invalid value given for 'DiscountType'");
483481
}
484482
}
485483

@@ -630,9 +628,7 @@ public void Validate()
630628
)
631629
)
632630
{
633-
throw new OrbInvalidDataException(
634-
"Invalid constant given for 'global::Orb.Models.Coupons.DiscountTypeModel'"
635-
);
631+
throw new OrbInvalidDataException("Invalid value given for 'DiscountTypeModel'");
636632
}
637633
}
638634

src/Orb/Models/Customers/Credits/Ledger/LedgerCreateEntryByExternalIDParams.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ public void Validate()
906906
{
907907
if (JsonElement.DeepEquals(this.Json, new EntryType5().Json))
908908
{
909-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType5'");
909+
throw new OrbInvalidDataException("Invalid value given for 'EntryType5'");
910910
}
911911
}
912912

@@ -1859,7 +1859,7 @@ public void Validate()
18591859
{
18601860
if (JsonElement.DeepEquals(this.Json, new EntryType6().Json))
18611861
{
1862-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType6'");
1862+
throw new OrbInvalidDataException("Invalid value given for 'EntryType6'");
18631863
}
18641864
}
18651865

@@ -2153,7 +2153,7 @@ public void Validate()
21532153
{
21542154
if (JsonElement.DeepEquals(this.Json, new EntryType7().Json))
21552155
{
2156-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType7'");
2156+
throw new OrbInvalidDataException("Invalid value given for 'EntryType7'");
21572157
}
21582158
}
21592159

@@ -2414,7 +2414,7 @@ public void Validate()
24142414
{
24152415
if (JsonElement.DeepEquals(this.Json, new EntryType8().Json))
24162416
{
2417-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType8'");
2417+
throw new OrbInvalidDataException("Invalid value given for 'EntryType8'");
24182418
}
24192419
}
24202420

@@ -2696,7 +2696,7 @@ public void Validate()
26962696
{
26972697
if (JsonElement.DeepEquals(this.Json, new EntryType9().Json))
26982698
{
2699-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType9'");
2699+
throw new OrbInvalidDataException("Invalid value given for 'EntryType9'");
27002700
}
27012701
}
27022702

src/Orb/Models/Customers/Credits/Ledger/LedgerCreateEntryParams.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ public void Validate()
891891
{
892892
if (JsonElement.DeepEquals(this.Json, new EntryTypeModel().Json))
893893
{
894-
throw new OrbInvalidDataException("Invalid constant given for 'EntryTypeModel'");
894+
throw new OrbInvalidDataException("Invalid value given for 'EntryTypeModel'");
895895
}
896896
}
897897

@@ -1825,7 +1825,7 @@ public void Validate()
18251825
{
18261826
if (JsonElement.DeepEquals(this.Json, new EntryType1().Json))
18271827
{
1828-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType1'");
1828+
throw new OrbInvalidDataException("Invalid value given for 'EntryType1'");
18291829
}
18301830
}
18311831

@@ -2119,7 +2119,7 @@ public void Validate()
21192119
{
21202120
if (JsonElement.DeepEquals(this.Json, new EntryType2().Json))
21212121
{
2122-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType2'");
2122+
throw new OrbInvalidDataException("Invalid value given for 'EntryType2'");
21232123
}
21242124
}
21252125

@@ -2380,7 +2380,7 @@ public void Validate()
23802380
{
23812381
if (JsonElement.DeepEquals(this.Json, new EntryType3().Json))
23822382
{
2383-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType3'");
2383+
throw new OrbInvalidDataException("Invalid value given for 'EntryType3'");
23842384
}
23852385
}
23862386

@@ -2660,7 +2660,7 @@ public void Validate()
26602660
{
26612661
if (JsonElement.DeepEquals(this.Json, new EntryType4().Json))
26622662
{
2663-
throw new OrbInvalidDataException("Invalid constant given for 'EntryType4'");
2663+
throw new OrbInvalidDataException("Invalid value given for 'EntryType4'");
26642664
}
26652665
}
26662666

src/Orb/Models/Customers/CustomerCreateParams.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ public void Validate()
11801180
{
11811181
if (JsonElement.DeepEquals(this.Json, new TaxProvider().Json))
11821182
{
1183-
throw new OrbInvalidDataException("Invalid constant given for 'TaxProvider'");
1183+
throw new OrbInvalidDataException("Invalid value given for 'TaxProvider'");
11841184
}
11851185
}
11861186

@@ -1345,7 +1345,7 @@ public void Validate()
13451345
{
13461346
if (JsonElement.DeepEquals(this.Json, new TaxProviderModel().Json))
13471347
{
1348-
throw new OrbInvalidDataException("Invalid constant given for 'TaxProviderModel'");
1348+
throw new OrbInvalidDataException("Invalid value given for 'TaxProviderModel'");
13491349
}
13501350
}
13511351

src/Orb/Models/Customers/CustomerUpdateByExternalIDParams.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ public void Validate()
11501150
{
11511151
if (JsonElement.DeepEquals(this.Json, new TaxProvider3().Json))
11521152
{
1153-
throw new OrbInvalidDataException("Invalid constant given for 'TaxProvider3'");
1153+
throw new OrbInvalidDataException("Invalid value given for 'TaxProvider3'");
11541154
}
11551155
}
11561156

@@ -1312,7 +1312,7 @@ public void Validate()
13121312
{
13131313
if (JsonElement.DeepEquals(this.Json, new TaxProvider4().Json))
13141314
{
1315-
throw new OrbInvalidDataException("Invalid constant given for 'TaxProvider4'");
1315+
throw new OrbInvalidDataException("Invalid value given for 'TaxProvider4'");
13161316
}
13171317
}
13181318

src/Orb/Models/Customers/CustomerUpdateParams.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ public void Validate()
11571157
{
11581158
if (JsonElement.DeepEquals(this.Json, new TaxProvider1().Json))
11591159
{
1160-
throw new OrbInvalidDataException("Invalid constant given for 'TaxProvider1'");
1160+
throw new OrbInvalidDataException("Invalid value given for 'TaxProvider1'");
11611161
}
11621162
}
11631163

@@ -1319,7 +1319,7 @@ public void Validate()
13191319
{
13201320
if (JsonElement.DeepEquals(this.Json, new TaxProvider2().Json))
13211321
{
1322-
throw new OrbInvalidDataException("Invalid constant given for 'TaxProvider2'");
1322+
throw new OrbInvalidDataException("Invalid value given for 'TaxProvider2'");
13231323
}
13241324
}
13251325

0 commit comments

Comments
 (0)