Skip to content

Commit f1fe13a

Browse files
chore(internal): codegen related update
1 parent 6b31ed5 commit f1fe13a

File tree

1,732 files changed

+218756
-224239
lines changed

Some content is hidden

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

1,732 files changed

+218756
-224239
lines changed

src/Orb.Tests/Services/Alerts/AlertServiceTest.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using System.Threading.Tasks;
2-
using Orb.Models.Alerts.AlertCreateForCustomerParamsProperties;
3-
using AlertCreateForExternalCustomerParamsProperties = Orb.Models.Alerts.AlertCreateForExternalCustomerParamsProperties;
4-
using AlertCreateForSubscriptionParamsProperties = Orb.Models.Alerts.AlertCreateForSubscriptionParamsProperties;
2+
using Orb.Models.Alerts;
53

64
namespace Orb.Tests.Services.Alerts;
75

@@ -52,7 +50,7 @@ public async Task CreateForExternalCustomer_Works()
5250
{
5351
ExternalCustomerID = "external_customer_id",
5452
Currency = "currency",
55-
Type = AlertCreateForExternalCustomerParamsProperties::Type.CreditBalanceDepleted,
53+
Type = TypeModel.CreditBalanceDepleted,
5654
}
5755
);
5856
alert.Validate();
@@ -66,7 +64,7 @@ public async Task CreateForSubscription_Works()
6664
{
6765
SubscriptionID = "subscription_id",
6866
Thresholds = [new(0)],
69-
Type = AlertCreateForSubscriptionParamsProperties::Type.UsageExceeded,
67+
Type = Type1.UsageExceeded,
7068
}
7169
);
7270
alert.Validate();

src/Orb.Tests/Services/Coupons/CouponServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Threading.Tasks;
2-
using Orb.Models.Coupons.CouponCreateParamsProperties.DiscountProperties;
2+
using Orb.Models.Coupons;
33

44
namespace Orb.Tests.Services.Coupons;
55

src/Orb.Tests/Services/CreditNotes/CreditNoteServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using System.Threading.Tasks;
3-
using Orb.Models.CreditNotes.CreditNoteCreateParamsProperties;
3+
using Orb.Models.CreditNotes;
44

55
namespace Orb.Tests.Services.CreditNotes;
66

src/Orb.Tests/Services/Customers/BalanceTransactions/BalanceTransactionServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Threading.Tasks;
2-
using Orb.Models.Customers.BalanceTransactions.BalanceTransactionCreateParamsProperties;
2+
using Orb.Models.Customers.BalanceTransactions;
33

44
namespace Orb.Tests.Services.Customers.BalanceTransactions;
55

src/Orb.Tests/Services/Customers/Credits/Ledger/LedgerServiceTest.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
4-
using Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryParamsProperties.BodyProperties.IncrementProperties.FilterProperties;
5-
using BodyProperties = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryParamsProperties.BodyProperties;
6-
using FilterProperties = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryByExternalIDParamsProperties.BodyProperties.IncrementProperties.FilterProperties;
4+
using Ledger = Orb.Models.Customers.Credits.Ledger;
75

86
namespace Orb.Tests.Services.Customers.Credits.Ledger;
97

@@ -26,7 +24,7 @@ public async Task CreateEntry_Works()
2624
{
2725
CustomerID = "customer_id",
2826
Body = new(
29-
new BodyProperties::Increment()
27+
new Ledger::Increment()
3028
{
3129
Amount = 0,
3230
Currency = "currency",
@@ -37,8 +35,8 @@ public async Task CreateEntry_Works()
3735
[
3836
new()
3937
{
40-
Field = Field.ItemID,
41-
Operator = Operator.Includes,
38+
Field = Ledger::Field.ItemID,
39+
Operator = Ledger::Operator.Includes,
4240
Values = ["string"],
4341
},
4442
],
@@ -69,7 +67,7 @@ public async Task CreateEntryByExternalID_Works()
6967
{
7068
ExternalCustomerID = "external_customer_id",
7169
Body = new(
72-
new global::Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryByExternalIDParamsProperties.BodyProperties.Increment()
70+
new Ledger::IncrementModel()
7371
{
7472
Amount = 0,
7573
Currency = "currency",
@@ -80,8 +78,8 @@ public async Task CreateEntryByExternalID_Works()
8078
[
8179
new()
8280
{
83-
Field = FilterProperties::Field.ItemID,
84-
Operator = FilterProperties::Operator.Includes,
81+
Field = Ledger::FieldModel.ItemID,
82+
Operator = Ledger::OperatorModel.Includes,
8583
Values = ["string"],
8684
},
8785
],

src/Orb.Tests/Services/Invoices/InvoiceServiceTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using System.Threading.Tasks;
3-
using Orb.Models.Invoices.InvoiceCreateParamsProperties.LineItemProperties;
3+
using Invoices = Orb.Models.Invoices;
44

55
namespace Orb.Tests.Services.Invoices;
66

@@ -20,7 +20,7 @@ public async Task Create_Works()
2020
{
2121
EndDate = DateOnly.Parse("2023-09-22"),
2222
ItemID = "4khy3nwzktxv7",
23-
ModelType = ModelType.Unit,
23+
ModelType = Invoices::ModelType.Unit,
2424
Name = "Line Item Name",
2525
Quantity = 1,
2626
StartDate = DateOnly.Parse("2023-09-22"),

src/Orb.Tests/Services/Plans/PlanServiceTest.cs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
using System.Collections.Generic;
22
using System.Threading.Tasks;
33
using Orb.Models;
4-
using Orb.Models.CustomExpirationProperties;
5-
using Orb.Models.NewAllocationPriceProperties;
6-
using Orb.Models.NewAllocationPriceProperties.FilterProperties;
7-
using Orb.Models.UnitConversionRateConfigProperties;
8-
using NewBillingCycleConfigurationProperties = Orb.Models.NewBillingCycleConfigurationProperties;
9-
using NewPlanUnitPriceProperties = Orb.Models.NewPlanUnitPriceProperties;
104

115
namespace Orb.Tests.Services.Plans;
126

@@ -32,15 +26,15 @@ public async Task Create_Works()
3226
CustomExpiration = new()
3327
{
3428
Duration = 0,
35-
DurationUnit = DurationUnit.Day,
29+
DurationUnit = DurationUnitModel.Day,
3630
},
3731
ExpiresAtEndOfCadence = true,
3832
Filters =
3933
[
4034
new()
4135
{
42-
Field = Field.ItemID,
43-
Operator = Operator.Includes,
36+
Field = Field11.ItemID,
37+
Operator = Operator11.Includes,
4438
Values = ["string"],
4539
},
4640
],
@@ -49,24 +43,23 @@ public async Task Create_Works()
4943
Price1 = new(
5044
new NewPlanUnitPrice()
5145
{
52-
Cadence = NewPlanUnitPriceProperties::Cadence.Annual,
46+
Cadence = Cadence48.Annual,
5347
ItemID = "item_id",
54-
ModelType = NewPlanUnitPriceProperties::ModelType.Unit,
48+
ModelType = ModelType47.Unit,
5549
Name = "Annual fee",
5650
UnitConfig = new("unit_amount"),
5751
BillableMetricID = "billable_metric_id",
5852
BilledInAdvance = true,
5953
BillingCycleConfiguration = new()
6054
{
6155
Duration = 0,
62-
DurationUnit =
63-
NewBillingCycleConfigurationProperties::DurationUnit.Day,
56+
DurationUnit = DurationUnit1.Day,
6457
},
6558
ConversionRate = 0,
6659
ConversionRateConfig = new(
6760
new UnitConversionRateConfig()
6861
{
69-
ConversionRateType = ConversionRateType.Unit,
62+
ConversionRateType = ConversionRateTypeModel.Unit,
7063
UnitConfig = new("unit_amount"),
7164
}
7265
),
@@ -84,8 +77,7 @@ public async Task Create_Works()
8477
InvoicingCycleConfiguration = new()
8578
{
8679
Duration = 0,
87-
DurationUnit =
88-
NewBillingCycleConfigurationProperties::DurationUnit.Day,
80+
DurationUnit = DurationUnit1.Day,
8981
},
9082
Metadata = new Dictionary<string, string?>()
9183
{

src/Orb.Tests/Services/Prices/PriceServiceTest.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
4-
using Orb.Models;
5-
using Orb.Models.NewBillingCycleConfigurationProperties;
6-
using Orb.Models.NewFloatingUnitPriceProperties;
7-
using Orb.Models.UnitConversionRateConfigProperties;
4+
using Models = Orb.Models;
85

96
namespace Orb.Tests.Services.Prices;
107

@@ -17,26 +14,26 @@ public async Task Create_Works()
1714
new()
1815
{
1916
Body = new(
20-
new NewFloatingUnitPrice()
17+
new Models::NewFloatingUnitPrice()
2118
{
22-
Cadence = Cadence.Annual,
19+
Cadence = Models::Cadence23.Annual,
2320
Currency = "currency",
2421
ItemID = "item_id",
25-
ModelType = ModelType.Unit,
22+
ModelType = Models::ModelType22.Unit,
2623
Name = "Annual fee",
2724
UnitConfig = new("unit_amount"),
2825
BillableMetricID = "billable_metric_id",
2926
BilledInAdvance = true,
3027
BillingCycleConfiguration = new()
3128
{
3229
Duration = 0,
33-
DurationUnit = DurationUnit.Day,
30+
DurationUnit = Models::DurationUnit1.Day,
3431
},
3532
ConversionRate = 0,
3633
ConversionRateConfig = new(
37-
new UnitConversionRateConfig()
34+
new Models::UnitConversionRateConfig()
3835
{
39-
ConversionRateType = ConversionRateType.Unit,
36+
ConversionRateType = Models::ConversionRateTypeModel.Unit,
4037
UnitConfig = new("unit_amount"),
4138
}
4239
),
@@ -52,7 +49,7 @@ public async Task Create_Works()
5249
InvoicingCycleConfiguration = new()
5350
{
5451
Duration = 0,
55-
DurationUnit = DurationUnit.Day,
52+
DurationUnit = Models::DurationUnit1.Day,
5653
},
5754
Metadata = new Dictionary<string, string?>() { { "foo", "string" } },
5855
}

src/Orb.Tests/Services/Subscriptions/SubscriptionServiceTest.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using System;
22
using System.Threading.Tasks;
3-
using Orb.Models.Subscriptions.SubscriptionCancelParamsProperties;
4-
using Orb.Models.Subscriptions.SubscriptionRedeemCouponParamsProperties;
5-
using SubscriptionSchedulePlanChangeParamsProperties = Orb.Models.Subscriptions.SubscriptionSchedulePlanChangeParamsProperties;
3+
using Orb.Models.Subscriptions;
64

75
namespace Orb.Tests.Services.Subscriptions;
86

@@ -105,8 +103,7 @@ public async Task SchedulePlanChange_Works()
105103
new()
106104
{
107105
SubscriptionID = "subscription_id",
108-
ChangeOption =
109-
SubscriptionSchedulePlanChangeParamsProperties::ChangeOption.RequestedDate,
106+
ChangeOption = ChangeOptionModel.RequestedDate,
110107
}
111108
);
112109
mutatedSubscription.Validate();

0 commit comments

Comments
 (0)