Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up .NET
uses: actions/setup-dotnet@v3
Expand All @@ -39,7 +39,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up .NET
uses: actions/setup-dotnet@v3
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/orb-csharp' && 'depot-windows-2022' || 'windows-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up .NET
uses: actions/setup-dotnet@v5
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "0.2.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 126
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d45078644e5890989174cc450ad8a814913af66bdb43350b63c1b93b98af9efd.yml
openapi_spec_hash: 9750de93e1e074a3e2e27f115422cb77
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9f1a41612765cb08d100b2c9e85080e93306e8d0942d535f16052c3eb18d9b8b.yml
openapi_spec_hash: 6dd28f36adc7e7d6a9245585eaf9b9c1
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 0.2.0 (2026-01-23)

Full Changelog: [v0.1.0...v0.2.0](https://github.com/orbcorp/orb-csharp/compare/v0.1.0...v0.2.0)

### Features

* **api:** api update ([2cd2dd8](https://github.com/orbcorp/orb-csharp/commit/2cd2dd8f519176f3618044ca6d4641e678af001b))
* **api:** api update ([d8f27e8](https://github.com/orbcorp/orb-csharp/commit/d8f27e8e10dc99f7d6e51186171181a05a59547d))
* **api:** api update ([3bd6cd6](https://github.com/orbcorp/orb-csharp/commit/3bd6cd6413b421ff644eee7f195e6fe0af47c56c))
* **client:** add `ToString` and `Equals` methods ([fed62bb](https://github.com/orbcorp/orb-csharp/commit/fed62bbc34caf8266c8c6b7a6646754677d45637))
* **client:** add `ToString` to `ApiEnum` ([551d3d9](https://github.com/orbcorp/orb-csharp/commit/551d3d983edbc2dd99c0143b2779146fa00ae80f))
* **client:** add Equals and ToString to params ([8a87021](https://github.com/orbcorp/orb-csharp/commit/8a870218bc1eebf9e4430ed69fedc206e7b9f25c))


### Chores

* change visibility of QueryString() and AddDefaultHeaders ([3f5afb6](https://github.com/orbcorp/orb-csharp/commit/3f5afb6e4e6d0c32a52e82c68c219391a09a0313))
* **internal:** add copy constructor tests ([9c7927a](https://github.com/orbcorp/orb-csharp/commit/9c7927a2079895ffcd40cc12611748f7b61bad02))
* **internal:** codegen related update ([2bc3e43](https://github.com/orbcorp/orb-csharp/commit/2bc3e436b724ff58d3191ea1c4632be595a9e5f5))
* **internal:** simplify imports ([79d3471](https://github.com/orbcorp/orb-csharp/commit/79d34710f779ca309e84faddc3e28bfa5b9c73bc))
* **internal:** update `actions/checkout` version ([5849a89](https://github.com/orbcorp/orb-csharp/commit/5849a89be72919068177e2830142c600a0bb7aeb))

## 0.1.0 (2026-01-14)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/orbcorp/orb-csharp/compare/v0.0.1...v0.1.0)
Expand Down
18 changes: 18 additions & 0 deletions src/Orb.Tests/Models/AddressTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,22 @@ public void Validation_Works()

model.Validate();
}

[Fact]
public void CopyConstructor_Works()
{
var model = new Address
{
City = "city",
Country = "country",
Line1 = "line1",
Line2 = "line2",
PostalCode = "postal_code",
State = "state",
};

Address copied = new(model);

Assert.Equal(model, copied);
}
}
36 changes: 36 additions & 0 deletions src/Orb.Tests/Models/AdjustmentIntervalTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,42 @@ public void Validation_Works()

model.Validate();
}

[Fact]
public void CopyConstructor_Works()
{
var model = new AdjustmentInterval
{
ID = "id",
Adjustment = new PlanPhaseUsageDiscountAdjustment()
{
ID = "id",
AdjustmentType = PlanPhaseUsageDiscountAdjustmentAdjustmentType.UsageDiscount,
AppliesToPriceIds = ["string"],
Filters =
[
new()
{
Field = PlanPhaseUsageDiscountAdjustmentFilterField.PriceID,
Operator = PlanPhaseUsageDiscountAdjustmentFilterOperator.Includes,
Values = ["string"],
},
],
IsInvoiceLevel = true,
PlanPhaseOrder = 0,
Reason = "reason",
ReplacesAdjustmentID = "replaces_adjustment_id",
UsageDiscount = 0,
},
AppliesToPriceIntervalIds = ["string"],
EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
};

AdjustmentInterval copied = new(model);

Assert.Equal(model, copied);
}
}

public class AdjustmentTest : TestBase
Expand Down
140 changes: 140 additions & 0 deletions src/Orb.Tests/Models/AggregatedCostTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -844,4 +844,144 @@ public void Validation_Works()

model.Validate();
}

[Fact]
public void CopyConstructor_Works()
{
var model = new AggregatedCost
{
PerPriceCosts =
[
new()
{
Price = new Unit()
{
ID = "id",
BillableMetric = new("id"),
BillingCycleConfiguration = new()
{
Duration = 0,
DurationUnit = DurationUnit.Day,
},
BillingMode = BillingMode.InAdvance,
Cadence = UnitCadence.OneTime,
CompositePriceFilters =
[
new()
{
Field = CompositePriceFilterField.PriceID,
Operator = CompositePriceFilterOperator.Includes,
Values = ["string"],
},
],
ConversionRate = 0,
ConversionRateConfig = new SharedUnitConversionRateConfig()
{
ConversionRateType =
SharedUnitConversionRateConfigConversionRateType.Unit,
UnitConfig = new("unit_amount"),
},
CreatedAt = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
CreditAllocation = new()
{
AllowsRollover = true,
Currency = "currency",
CustomExpiration = new()
{
Duration = 0,
DurationUnit = CustomExpirationDurationUnit.Day,
},
Filters =
[
new()
{
Field = Field.PriceID,
Operator = Operator.Includes,
Values = ["string"],
},
],
},
Currency = "currency",
Discount = new PercentageDiscount()
{
DiscountType = PercentageDiscountDiscountType.Percentage,
PercentageDiscountValue = 0.15,
AppliesToPriceIds = ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"],
Filters =
[
new()
{
Field = PercentageDiscountFilterField.PriceID,
Operator = PercentageDiscountFilterOperator.Includes,
Values = ["string"],
},
],
Reason = "reason",
},
ExternalPriceID = "external_price_id",
FixedPriceQuantity = 0,
InvoicingCycleConfiguration = new()
{
Duration = 0,
DurationUnit = DurationUnit.Day,
},
Item = new() { ID = "id", Name = "name" },
Maximum = new()
{
AppliesToPriceIds = ["string"],
Filters =
[
new()
{
Field = MaximumFilterField.PriceID,
Operator = MaximumFilterOperator.Includes,
Values = ["string"],
},
],
MaximumAmount = "maximum_amount",
},
MaximumAmount = "maximum_amount",
Metadata = new Dictionary<string, string>() { { "foo", "string" } },
Minimum = new()
{
AppliesToPriceIds = ["string"],
Filters =
[
new()
{
Field = MinimumFilterField.PriceID,
Operator = MinimumFilterOperator.Includes,
Values = ["string"],
},
],
MinimumAmount = "minimum_amount",
},
MinimumAmount = "minimum_amount",
Name = "name",
PlanPhaseOrder = 0,
PriceType = UnitPriceType.UsagePrice,
ReplacesPriceID = "replaces_price_id",
UnitConfig = new() { UnitAmount = "unit_amount", Prorated = true },
DimensionalPriceConfiguration = new()
{
DimensionValues = ["string"],
DimensionalPriceGroupID = "dimensional_price_group_id",
},
},
PriceID = "price_id",
Subtotal = "subtotal",
Total = "total",
Quantity = 0,
},
],
Subtotal = "subtotal",
TimeframeEnd = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
TimeframeStart = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
Total = "total",
};

AggregatedCost copied = new(model);

Assert.Equal(model, copied);
}
}
16 changes: 16 additions & 0 deletions src/Orb.Tests/Models/Alerts/AlertCreateForCustomerParamsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ public void Url_Works()

Assert.Equal(new Uri("https://api.withorb.com/v1/alerts/customer_id/customer_id"), url);
}

[Fact]
public void CopyConstructor_Works()
{
var parameters = new Alerts::AlertCreateForCustomerParams
{
CustomerID = "customer_id",
Currency = "currency",
Type = Alerts::Type.CreditBalanceDepleted,
Thresholds = [new(0)],
};

Alerts::AlertCreateForCustomerParams copied = new(parameters);

Assert.Equal(parameters, copied);
}
}

public class TypeTest : TestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ public void Url_Works()
url
);
}

[Fact]
public void CopyConstructor_Works()
{
var parameters = new AlertCreateForExternalCustomerParams
{
ExternalCustomerID = "external_customer_id",
Currency = "currency",
Type = AlertCreateForExternalCustomerParamsType.CreditBalanceDepleted,
Thresholds = [new(0)],
};

AlertCreateForExternalCustomerParams copied = new(parameters);

Assert.Equal(parameters, copied);
}
}

public class AlertCreateForExternalCustomerParamsTypeTest : TestBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ public void Url_Works()
url
);
}

[Fact]
public void CopyConstructor_Works()
{
var parameters = new AlertCreateForSubscriptionParams
{
SubscriptionID = "subscription_id",
Thresholds = [new(0)],
Type = AlertCreateForSubscriptionParamsType.UsageExceeded,
MetricID = "metric_id",
};

AlertCreateForSubscriptionParams copied = new(parameters);

Assert.Equal(parameters, copied);
}
}

public class AlertCreateForSubscriptionParamsTypeTest : TestBase
Expand Down
14 changes: 14 additions & 0 deletions src/Orb.Tests/Models/Alerts/AlertDisableParamsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,18 @@ public void Url_Works()
url
);
}

[Fact]
public void CopyConstructor_Works()
{
var parameters = new AlertDisableParams
{
AlertConfigurationID = "alert_configuration_id",
SubscriptionID = "subscription_id",
};

AlertDisableParams copied = new(parameters);

Assert.Equal(parameters, copied);
}
}
14 changes: 14 additions & 0 deletions src/Orb.Tests/Models/Alerts/AlertEnableParamsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,18 @@ public void Url_Works()
url
);
}

[Fact]
public void CopyConstructor_Works()
{
var parameters = new AlertEnableParams
{
AlertConfigurationID = "alert_configuration_id",
SubscriptionID = "subscription_id",
};

AlertEnableParams copied = new(parameters);

Assert.Equal(parameters, copied);
}
}
Loading
Loading