Skip to content

Commit 93841bc

Browse files
refactor(client)!: change casing of some identifiers
# Migration Only use all-caps in PascalCase for two-letter acronyms. Otherwise, use a capital letter for the first letter and lowercase letters for the rest. See https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions#capitalization-rules-for-identifiers
1 parent e432e2a commit 93841bc

File tree

228 files changed

+5385
-5385
lines changed

Some content is hidden

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

228 files changed

+5385
-5385
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Or manually:
6060
```csharp
6161
using Orb;
6262

63-
OrbClient client = new() { APIKey = "My API Key" };
63+
OrbClient client = new() { ApiKey = "My API Key" };
6464
```
6565

6666
Or using a combination of the two approaches.
@@ -69,7 +69,7 @@ See this table for the available options:
6969

7070
| Property | Environment variable | Required | Default value |
7171
| --------------- | -------------------- | -------- | ------------------------------ |
72-
| `APIKey` | `ORB_API_KEY` | true | - |
72+
| `ApiKey` | `ORB_API_KEY` | true | - |
7373
| `WebhookSecret` | `ORB_WEBHOOK_SECRET` | false | - |
7474
| `BaseUrl` | `ORB_BASE_URL` | true | `"https://api.withorb.com/v1"` |
7575

src/Orb.Tests/Models/AdjustmentIntervalTest.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void FieldRoundtrip_Works()
1717
{
1818
ID = "id",
1919
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
20-
AppliesToPriceIDs = ["string"],
20+
AppliesToPriceIds = ["string"],
2121
Filters =
2222
[
2323
new()
@@ -33,7 +33,7 @@ public void FieldRoundtrip_Works()
3333
ReplacesAdjustmentID = "replaces_adjustment_id",
3434
UsageDiscount = 0,
3535
},
36-
AppliesToPriceIntervalIDs = ["string"],
36+
AppliesToPriceIntervalIds = ["string"],
3737
EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
3838
StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
3939
};
@@ -43,7 +43,7 @@ public void FieldRoundtrip_Works()
4343
{
4444
ID = "id",
4545
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
46-
AppliesToPriceIDs = ["string"],
46+
AppliesToPriceIds = ["string"],
4747
Filters =
4848
[
4949
new()
@@ -59,19 +59,19 @@ public void FieldRoundtrip_Works()
5959
ReplacesAdjustmentID = "replaces_adjustment_id",
6060
UsageDiscount = 0,
6161
};
62-
List<string> expectedAppliesToPriceIntervalIDs = ["string"];
62+
List<string> expectedAppliesToPriceIntervalIds = ["string"];
6363
DateTimeOffset expectedEndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z");
6464
DateTimeOffset expectedStartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z");
6565

6666
Assert.Equal(expectedID, model.ID);
6767
Assert.Equal(expectedAdjustment, model.Adjustment);
6868
Assert.Equal(
69-
expectedAppliesToPriceIntervalIDs.Count,
70-
model.AppliesToPriceIntervalIDs.Count
69+
expectedAppliesToPriceIntervalIds.Count,
70+
model.AppliesToPriceIntervalIds.Count
7171
);
72-
for (int i = 0; i < expectedAppliesToPriceIntervalIDs.Count; i++)
72+
for (int i = 0; i < expectedAppliesToPriceIntervalIds.Count; i++)
7373
{
74-
Assert.Equal(expectedAppliesToPriceIntervalIDs[i], model.AppliesToPriceIntervalIDs[i]);
74+
Assert.Equal(expectedAppliesToPriceIntervalIds[i], model.AppliesToPriceIntervalIds[i]);
7575
}
7676
Assert.Equal(expectedEndDate, model.EndDate);
7777
Assert.Equal(expectedStartDate, model.StartDate);
@@ -87,7 +87,7 @@ public void SerializationRoundtrip_Works()
8787
{
8888
ID = "id",
8989
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
90-
AppliesToPriceIDs = ["string"],
90+
AppliesToPriceIds = ["string"],
9191
Filters =
9292
[
9393
new()
@@ -103,7 +103,7 @@ public void SerializationRoundtrip_Works()
103103
ReplacesAdjustmentID = "replaces_adjustment_id",
104104
UsageDiscount = 0,
105105
},
106-
AppliesToPriceIntervalIDs = ["string"],
106+
AppliesToPriceIntervalIds = ["string"],
107107
EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
108108
StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
109109
};
@@ -124,7 +124,7 @@ public void FieldRoundtripThroughSerialization_Works()
124124
{
125125
ID = "id",
126126
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
127-
AppliesToPriceIDs = ["string"],
127+
AppliesToPriceIds = ["string"],
128128
Filters =
129129
[
130130
new()
@@ -140,7 +140,7 @@ public void FieldRoundtripThroughSerialization_Works()
140140
ReplacesAdjustmentID = "replaces_adjustment_id",
141141
UsageDiscount = 0,
142142
},
143-
AppliesToPriceIntervalIDs = ["string"],
143+
AppliesToPriceIntervalIds = ["string"],
144144
EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
145145
StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
146146
};
@@ -154,7 +154,7 @@ public void FieldRoundtripThroughSerialization_Works()
154154
{
155155
ID = "id",
156156
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
157-
AppliesToPriceIDs = ["string"],
157+
AppliesToPriceIds = ["string"],
158158
Filters =
159159
[
160160
new()
@@ -170,21 +170,21 @@ public void FieldRoundtripThroughSerialization_Works()
170170
ReplacesAdjustmentID = "replaces_adjustment_id",
171171
UsageDiscount = 0,
172172
};
173-
List<string> expectedAppliesToPriceIntervalIDs = ["string"];
173+
List<string> expectedAppliesToPriceIntervalIds = ["string"];
174174
DateTimeOffset expectedEndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z");
175175
DateTimeOffset expectedStartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z");
176176

177177
Assert.Equal(expectedID, deserialized.ID);
178178
Assert.Equal(expectedAdjustment, deserialized.Adjustment);
179179
Assert.Equal(
180-
expectedAppliesToPriceIntervalIDs.Count,
181-
deserialized.AppliesToPriceIntervalIDs.Count
180+
expectedAppliesToPriceIntervalIds.Count,
181+
deserialized.AppliesToPriceIntervalIds.Count
182182
);
183-
for (int i = 0; i < expectedAppliesToPriceIntervalIDs.Count; i++)
183+
for (int i = 0; i < expectedAppliesToPriceIntervalIds.Count; i++)
184184
{
185185
Assert.Equal(
186-
expectedAppliesToPriceIntervalIDs[i],
187-
deserialized.AppliesToPriceIntervalIDs[i]
186+
expectedAppliesToPriceIntervalIds[i],
187+
deserialized.AppliesToPriceIntervalIds[i]
188188
);
189189
}
190190
Assert.Equal(expectedEndDate, deserialized.EndDate);
@@ -201,7 +201,7 @@ public void Validation_Works()
201201
{
202202
ID = "id",
203203
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
204-
AppliesToPriceIDs = ["string"],
204+
AppliesToPriceIds = ["string"],
205205
Filters =
206206
[
207207
new()
@@ -217,7 +217,7 @@ public void Validation_Works()
217217
ReplacesAdjustmentID = "replaces_adjustment_id",
218218
UsageDiscount = 0,
219219
},
220-
AppliesToPriceIntervalIDs = ["string"],
220+
AppliesToPriceIntervalIds = ["string"],
221221
EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
222222
StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
223223
};
@@ -236,7 +236,7 @@ public void PlanPhaseUsageDiscountValidationWorks()
236236
{
237237
ID = "id",
238238
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
239-
AppliesToPriceIDs = ["string"],
239+
AppliesToPriceIds = ["string"],
240240
Filters =
241241
[
242242
new()
@@ -265,7 +265,7 @@ public void PlanPhaseAmountDiscountValidationWorks()
265265
ID = "id",
266266
AdjustmentType = PlanPhaseAmountDiscountAdjustmentAdjustmentType.AmountDiscount,
267267
AmountDiscount = "amount_discount",
268-
AppliesToPriceIDs = ["string"],
268+
AppliesToPriceIds = ["string"],
269269
Filters =
270270
[
271271
new()
@@ -293,7 +293,7 @@ public void PlanPhasePercentageDiscountValidationWorks()
293293
ID = "id",
294294
AdjustmentType =
295295
PlanPhasePercentageDiscountAdjustmentAdjustmentType.PercentageDiscount,
296-
AppliesToPriceIDs = ["string"],
296+
AppliesToPriceIds = ["string"],
297297
Filters =
298298
[
299299
new()
@@ -321,7 +321,7 @@ public void PlanPhaseMinimumValidationWorks()
321321
{
322322
ID = "id",
323323
AdjustmentType = PlanPhaseMinimumAdjustmentAdjustmentType.Minimum,
324-
AppliesToPriceIDs = ["string"],
324+
AppliesToPriceIds = ["string"],
325325
Filters =
326326
[
327327
new()
@@ -350,7 +350,7 @@ public void PlanPhaseMaximumValidationWorks()
350350
{
351351
ID = "id",
352352
AdjustmentType = PlanPhaseMaximumAdjustmentAdjustmentType.Maximum,
353-
AppliesToPriceIDs = ["string"],
353+
AppliesToPriceIds = ["string"],
354354
Filters =
355355
[
356356
new()
@@ -378,7 +378,7 @@ public void PlanPhaseUsageDiscountSerializationRoundtripWorks()
378378
{
379379
ID = "id",
380380
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
381-
AppliesToPriceIDs = ["string"],
381+
AppliesToPriceIds = ["string"],
382382
Filters =
383383
[
384384
new()
@@ -410,7 +410,7 @@ public void PlanPhaseAmountDiscountSerializationRoundtripWorks()
410410
ID = "id",
411411
AdjustmentType = PlanPhaseAmountDiscountAdjustmentAdjustmentType.AmountDiscount,
412412
AmountDiscount = "amount_discount",
413-
AppliesToPriceIDs = ["string"],
413+
AppliesToPriceIds = ["string"],
414414
Filters =
415415
[
416416
new()
@@ -441,7 +441,7 @@ public void PlanPhasePercentageDiscountSerializationRoundtripWorks()
441441
ID = "id",
442442
AdjustmentType =
443443
PlanPhasePercentageDiscountAdjustmentAdjustmentType.PercentageDiscount,
444-
AppliesToPriceIDs = ["string"],
444+
AppliesToPriceIds = ["string"],
445445
Filters =
446446
[
447447
new()
@@ -472,7 +472,7 @@ public void PlanPhaseMinimumSerializationRoundtripWorks()
472472
{
473473
ID = "id",
474474
AdjustmentType = PlanPhaseMinimumAdjustmentAdjustmentType.Minimum,
475-
AppliesToPriceIDs = ["string"],
475+
AppliesToPriceIds = ["string"],
476476
Filters =
477477
[
478478
new()
@@ -504,7 +504,7 @@ public void PlanPhaseMaximumSerializationRoundtripWorks()
504504
{
505505
ID = "id",
506506
AdjustmentType = PlanPhaseMaximumAdjustmentAdjustmentType.Maximum,
507-
AppliesToPriceIDs = ["string"],
507+
AppliesToPriceIds = ["string"],
508508
Filters =
509509
[
510510
new()

0 commit comments

Comments
 (0)