1- using Beta = Orb . Models . Beta ;
2- using BetaCreatePlanVersionParamsProperties = Orb . Models . Beta . BetaCreatePlanVersionParamsProperties ;
31using CustomExpirationProperties = Orb . Models . CustomExpirationProperties ;
42using Models = Orb . Models ;
53using NewAllocationPriceProperties = Orb . Models . NewAllocationPriceProperties ;
@@ -19,13 +17,13 @@ public class BetaServiceTest : Tests::TestBase
1917 public async Tasks ::Task CreatePlanVersion_Works ( )
2018 {
2119 var planVersion = await this . client . Beta . CreatePlanVersion (
22- new Beta :: BetaCreatePlanVersionParams ( )
20+ new ( )
2321 {
2422 PlanID = "plan_id" ,
2523 Version = 0 ,
2624 AddAdjustments =
2725 [
28- new BetaCreatePlanVersionParamsProperties :: AddAdjustment ( )
26+ new ( )
2927 {
3028 Adjustment = new Models ::NewPercentageDiscount ( )
3129 {
@@ -38,7 +36,7 @@ public class BetaServiceTest : Tests::TestBase
3836 Currency = "currency" ,
3937 Filters =
4038 [
41- new Models :: TransformPriceFilter ( )
39+ new ( )
4240 {
4341 Field = TransformPriceFilterProperties ::Field . PriceID ,
4442 Operator = TransformPriceFilterProperties ::Operator . Includes ,
@@ -53,14 +51,14 @@ public class BetaServiceTest : Tests::TestBase
5351 ] ,
5452 AddPrices =
5553 [
56- new BetaCreatePlanVersionParamsProperties :: AddPrice ( )
54+ new ( )
5755 {
58- AllocationPrice = new Models :: NewAllocationPrice ( )
56+ AllocationPrice = new ( )
5957 {
6058 Amount = "10.00" ,
6159 Cadence = NewAllocationPriceProperties ::Cadence . Monthly ,
6260 Currency = "USD" ,
63- CustomExpiration = new Models :: CustomExpiration ( )
61+ CustomExpiration = new ( )
6462 {
6563 Duration = 0 ,
6664 DurationUnit = CustomExpirationProperties ::DurationUnit . Day ,
@@ -74,10 +72,10 @@ public class BetaServiceTest : Tests::TestBase
7472 ItemID = "item_id" ,
7573 ModelType = NewPlanUnitPriceProperties ::ModelType . Unit ,
7674 Name = "Annual fee" ,
77- UnitConfig = new Models :: UnitConfig ( ) { UnitAmount = "unit_amount" } ,
75+ UnitConfig = new ( ) { UnitAmount = "unit_amount" } ,
7876 BillableMetricID = "billable_metric_id" ,
7977 BilledInAdvance = true ,
80- BillingCycleConfiguration = new Models :: NewBillingCycleConfiguration ( )
78+ BillingCycleConfiguration = new ( )
8179 {
8280 Duration = 0 ,
8381 DurationUnit =
@@ -88,24 +86,20 @@ public class BetaServiceTest : Tests::TestBase
8886 {
8987 ConversionRateType =
9088 UnitConversionRateConfigProperties ::ConversionRateType . Unit ,
91- UnitConfig = new Models ::ConversionRateUnitConfig ( )
92- {
93- UnitAmount = "unit_amount" ,
94- } ,
89+ UnitConfig = new ( ) { UnitAmount = "unit_amount" } ,
9590 } ,
9691 Currency = "currency" ,
97- DimensionalPriceConfiguration =
98- new Models ::NewDimensionalPriceConfiguration ( )
99- {
100- DimensionValues = [ "string" ] ,
101- DimensionalPriceGroupID = "dimensional_price_group_id" ,
102- ExternalDimensionalPriceGroupID =
103- "external_dimensional_price_group_id" ,
104- } ,
92+ DimensionalPriceConfiguration = new ( )
93+ {
94+ DimensionValues = [ "string" ] ,
95+ DimensionalPriceGroupID = "dimensional_price_group_id" ,
96+ ExternalDimensionalPriceGroupID =
97+ "external_dimensional_price_group_id" ,
98+ } ,
10599 ExternalPriceID = "external_price_id" ,
106100 FixedPriceQuantity = 0 ,
107101 InvoiceGroupingKey = "x" ,
108- InvoicingCycleConfiguration = new Models :: NewBillingCycleConfiguration ( )
102+ InvoicingCycleConfiguration = new ( )
109103 {
110104 Duration = 0 ,
111105 DurationUnit =
@@ -116,25 +110,11 @@ public class BetaServiceTest : Tests::TestBase
116110 } ,
117111 } ,
118112 ] ,
119- RemoveAdjustments =
120- [
121- new BetaCreatePlanVersionParamsProperties ::RemoveAdjustment ( )
122- {
123- AdjustmentID = "adjustment_id" ,
124- PlanPhaseOrder = 0 ,
125- } ,
126- ] ,
127- RemovePrices =
128- [
129- new BetaCreatePlanVersionParamsProperties ::RemovePrice ( )
130- {
131- PriceID = "price_id" ,
132- PlanPhaseOrder = 0 ,
133- } ,
134- ] ,
113+ RemoveAdjustments = [ new ( ) { AdjustmentID = "adjustment_id" , PlanPhaseOrder = 0 } ] ,
114+ RemovePrices = [ new ( ) { PriceID = "price_id" , PlanPhaseOrder = 0 } ] ,
135115 ReplaceAdjustments =
136116 [
137- new BetaCreatePlanVersionParamsProperties :: ReplaceAdjustment ( )
117+ new ( )
138118 {
139119 Adjustment = new Models ::NewPercentageDiscount ( )
140120 {
@@ -147,7 +127,7 @@ public class BetaServiceTest : Tests::TestBase
147127 Currency = "currency" ,
148128 Filters =
149129 [
150- new Models :: TransformPriceFilter ( )
130+ new ( )
151131 {
152132 Field = TransformPriceFilterProperties ::Field . PriceID ,
153133 Operator = TransformPriceFilterProperties ::Operator . Includes ,
@@ -163,15 +143,15 @@ public class BetaServiceTest : Tests::TestBase
163143 ] ,
164144 ReplacePrices =
165145 [
166- new BetaCreatePlanVersionParamsProperties :: ReplacePrice ( )
146+ new ( )
167147 {
168148 ReplacesPriceID = "replaces_price_id" ,
169- AllocationPrice = new Models :: NewAllocationPrice ( )
149+ AllocationPrice = new ( )
170150 {
171151 Amount = "10.00" ,
172152 Cadence = NewAllocationPriceProperties ::Cadence . Monthly ,
173153 Currency = "USD" ,
174- CustomExpiration = new Models :: CustomExpiration ( )
154+ CustomExpiration = new ( )
175155 {
176156 Duration = 0 ,
177157 DurationUnit = CustomExpirationProperties ::DurationUnit . Day ,
@@ -185,10 +165,10 @@ public class BetaServiceTest : Tests::TestBase
185165 ItemID = "item_id" ,
186166 ModelType = NewPlanUnitPriceProperties ::ModelType . Unit ,
187167 Name = "Annual fee" ,
188- UnitConfig = new Models :: UnitConfig ( ) { UnitAmount = "unit_amount" } ,
168+ UnitConfig = new ( ) { UnitAmount = "unit_amount" } ,
189169 BillableMetricID = "billable_metric_id" ,
190170 BilledInAdvance = true ,
191- BillingCycleConfiguration = new Models :: NewBillingCycleConfiguration ( )
171+ BillingCycleConfiguration = new ( )
192172 {
193173 Duration = 0 ,
194174 DurationUnit =
@@ -199,24 +179,20 @@ public class BetaServiceTest : Tests::TestBase
199179 {
200180 ConversionRateType =
201181 UnitConversionRateConfigProperties ::ConversionRateType . Unit ,
202- UnitConfig = new Models ::ConversionRateUnitConfig ( )
203- {
204- UnitAmount = "unit_amount" ,
205- } ,
182+ UnitConfig = new ( ) { UnitAmount = "unit_amount" } ,
206183 } ,
207184 Currency = "currency" ,
208- DimensionalPriceConfiguration =
209- new Models ::NewDimensionalPriceConfiguration ( )
210- {
211- DimensionValues = [ "string" ] ,
212- DimensionalPriceGroupID = "dimensional_price_group_id" ,
213- ExternalDimensionalPriceGroupID =
214- "external_dimensional_price_group_id" ,
215- } ,
185+ DimensionalPriceConfiguration = new ( )
186+ {
187+ DimensionValues = [ "string" ] ,
188+ DimensionalPriceGroupID = "dimensional_price_group_id" ,
189+ ExternalDimensionalPriceGroupID =
190+ "external_dimensional_price_group_id" ,
191+ } ,
216192 ExternalPriceID = "external_price_id" ,
217193 FixedPriceQuantity = 0 ,
218194 InvoiceGroupingKey = "x" ,
219- InvoicingCycleConfiguration = new Models :: NewBillingCycleConfiguration ( )
195+ InvoicingCycleConfiguration = new ( )
220196 {
221197 Duration = 0 ,
222198 DurationUnit =
@@ -237,7 +213,7 @@ public class BetaServiceTest : Tests::TestBase
237213 public async Tasks ::Task FetchPlanVersion_Works ( )
238214 {
239215 var planVersion = await this . client . Beta . FetchPlanVersion (
240- new Beta :: BetaFetchPlanVersionParams ( ) { PlanID = "plan_id" , Version = "version" }
216+ new ( ) { PlanID = "plan_id" , Version = "version" }
241217 ) ;
242218 planVersion . Validate ( ) ;
243219 }
@@ -246,7 +222,7 @@ public class BetaServiceTest : Tests::TestBase
246222 public async Tasks ::Task SetDefaultPlanVersion_Works ( )
247223 {
248224 var plan = await this . client . Beta . SetDefaultPlanVersion (
249- new Beta :: BetaSetDefaultPlanVersionParams ( ) { PlanID = "plan_id" , Version = 0 }
225+ new ( ) { PlanID = "plan_id" , Version = 0 }
250226 ) ;
251227 plan . Validate ( ) ;
252228 }
0 commit comments