Skip to content
Closed
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
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 116
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-612316c13276a207f56e2e2c7bbc68f4bb73de85e3661595a23f23d9ccc80276.yml
openapi_spec_hash: 6e125f05e40521ec485edf6e15beec2e
config_hash: 8c9a47f104c777e2a1e8f3fad15c093b
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-4f31d46f5ba187fc4d702c9f9f1573dacb891edbd086f935707578d7c4f5fed8.yml
openapi_spec_hash: 25b1019f20a47b8af665aae5f8fd0025
config_hash: 5135e9237207028f293049a77428c775
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

## 0.1.0 (2025-07-29)

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

### Features

* **api:** add C# ([e2db41d](https://github.com/orbcorp/orb-csharp/commit/e2db41d4c0585fc2e3472df2a88a5be4cb2432fb))
* **api:** api update ([b08df82](https://github.com/orbcorp/orb-csharp/commit/b08df824c44e6cc0ac72d42b07c3c089f501862d))
* **api:** api update ([d0d1a79](https://github.com/orbcorp/orb-csharp/commit/d0d1a7995095b23506e98a0ba0e5bdb47370dc5f))
* **api:** api update ([268fdab](https://github.com/orbcorp/orb-csharp/commit/268fdab77f42a6e87ffc2f7fd1863bbd05d30033))
* **api:** api update ([7c7a621](https://github.com/orbcorp/orb-csharp/commit/7c7a621be47edaca08972e0986c72dab410ec052))
* **client:** automatically set constants for user ([25e678a](https://github.com/orbcorp/orb-csharp/commit/25e678a352492d8119389201e754ffa1b96b85a0))
* **client:** implement implicit union casts ([5a6d432](https://github.com/orbcorp/orb-csharp/commit/5a6d4322fd6e82838a22f6658a6252f0c76bf367))
* **internal:** generate release flow files ([3eb9334](https://github.com/orbcorp/orb-csharp/commit/3eb9334def8a6d9e09154e9c3d606f42897379fa))


### Documentation

* note alpha status ([3167be0](https://github.com/orbcorp/orb-csharp/commit/3167be06e8e3929b18e0d4d6af09f69608e68515))
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Orb C# API Library

> [!NOTE]
> The Orb C# API Library is currently in alpha.
>
> There may be frequent breaking changes.

The Orb C# SDK provides convenient access to the [Orb REST API](https://docs.withorb.com/reference/api-reference) from applications written in C#.

The REST API documentation can be found on [docs.withorb.com](https://docs.withorb.com/reference/api-reference).
Expand Down
66 changes: 66 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"release-type": "simple",
"extra-files": [
"README.md"
]
}
282 changes: 126 additions & 156 deletions src/Orb.Tests/Service/Beta/BetaServiceTest.cs

Large diffs are not rendered by default.

282 changes: 126 additions & 156 deletions src/Orb.Tests/Service/Beta/ExternalPlanID/ExternalPlanIDServiceTest.cs

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions src/Orb.Tests/Service/Coupons/CouponServiceTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using CouponCreateParamsProperties = Orb.Models.Coupons.CouponCreateParamsProperties;
using Coupons = Orb.Models.Coupons;
using DiscountProperties = Orb.Models.Coupons.CouponCreateParamsProperties.DiscountProperties;
using PercentageProperties = Orb.Models.Coupons.CouponCreateParamsProperties.DiscountProperties.PercentageProperties;
using Tasks = System.Threading.Tasks;
using Tests = Orb.Tests;

Expand All @@ -15,13 +13,7 @@ public class CouponServiceTest : Tests::TestBase
var coupon = await this.client.Coupons.Create(
new Coupons::CouponCreateParams()
{
Discount = CouponCreateParamsProperties::Discount.Create(
new DiscountProperties::Percentage()
{
DiscountType = PercentageProperties::DiscountType.Percentage,
PercentageDiscount = 0,
}
),
Discount = new DiscountProperties::Percentage() { PercentageDiscount = 0 },
RedemptionCode = "HALFOFF",
DurationInMonths = 12,
MaxRedemptions = 1,
Expand Down
82 changes: 34 additions & 48 deletions src/Orb.Tests/Service/Customers/Credits/Ledger/LedgerServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
using BodyProperties1 = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryByExternalIDParamsProperties.BodyProperties;
using IncrementProperties = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryParamsProperties.BodyProperties.IncrementProperties;
using IncrementProperties1 = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryByExternalIDParamsProperties.BodyProperties.IncrementProperties;
using InvoiceSettingsProperties = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryParamsProperties.BodyProperties.IncrementProperties.InvoiceSettingsProperties;
using InvoiceSettingsProperties1 = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryByExternalIDParamsProperties.BodyProperties.IncrementProperties.InvoiceSettingsProperties;
using Ledger = Orb.Models.Customers.Credits.Ledger;
using LedgerCreateEntryByExternalIDParamsProperties = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryByExternalIDParamsProperties;
using LedgerCreateEntryParamsProperties = Orb.Models.Customers.Credits.Ledger.LedgerCreateEntryParamsProperties;
using LedgerListByExternalIDParamsProperties = Orb.Models.Customers.Credits.Ledger.LedgerListByExternalIDParamsProperties;
using LedgerListParamsProperties = Orb.Models.Customers.Credits.Ledger.LedgerListParamsProperties;
using System = System;
Expand Down Expand Up @@ -46,29 +42,24 @@ public class LedgerServiceTest : Tests::TestBase
new Ledger::LedgerCreateEntryParams()
{
CustomerID = "customer_id",
Body = LedgerCreateEntryParamsProperties::Body.Create(
new BodyProperties::Increment()
Body = new BodyProperties::Increment()
{
Amount = 0,
Currency = "currency",
Description = "description",
EffectiveDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
ExpiryDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
InvoiceSettings = new IncrementProperties::InvoiceSettings()
{
Amount = 0,
EntryType = IncrementProperties::EntryType.Increment,
Currency = "currency",
Description = "description",
EffectiveDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
ExpiryDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
InvoiceSettings = new IncrementProperties::InvoiceSettings()
{
AutoCollection = true,
NetTerms = 0,
InvoiceDate = InvoiceSettingsProperties::InvoiceDate.Create(
System::DateOnly.Parse("2019-12-27")
),
Memo = "memo",
RequireSuccessfulPayment = true,
},
Metadata = new() { { "foo", "string" } },
PerUnitCostBasis = "per_unit_cost_basis",
}
),
AutoCollection = true,
NetTerms = 0,
InvoiceDate = System::DateOnly.Parse("2019-12-27"),
Memo = "memo",
RequireSuccessfulPayment = true,
},
Metadata = new() { { "foo", "string" } },
PerUnitCostBasis = "per_unit_cost_basis",
},
}
);
response.Validate();
Expand All @@ -81,29 +72,24 @@ public class LedgerServiceTest : Tests::TestBase
new Ledger::LedgerCreateEntryByExternalIDParams()
{
ExternalCustomerID = "external_customer_id",
Body = LedgerCreateEntryByExternalIDParamsProperties::Body.Create(
new BodyProperties1::Increment()
Body = new BodyProperties1::Increment()
{
Amount = 0,
Currency = "currency",
Description = "description",
EffectiveDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
ExpiryDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
InvoiceSettings = new IncrementProperties1::InvoiceSettings()
{
Amount = 0,
EntryType = IncrementProperties1::EntryType.Increment,
Currency = "currency",
Description = "description",
EffectiveDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
ExpiryDate = System::DateTime.Parse("2019-12-27T18:11:19.117Z"),
InvoiceSettings = new IncrementProperties1::InvoiceSettings()
{
AutoCollection = true,
NetTerms = 0,
InvoiceDate = InvoiceSettingsProperties1::InvoiceDate.Create(
System::DateOnly.Parse("2019-12-27")
),
Memo = "memo",
RequireSuccessfulPayment = true,
},
Metadata = new() { { "foo", "string" } },
PerUnitCostBasis = "per_unit_cost_basis",
}
),
AutoCollection = true,
NetTerms = 0,
InvoiceDate = System::DateOnly.Parse("2019-12-27"),
Memo = "memo",
RequireSuccessfulPayment = true,
},
Metadata = new() { { "foo", "string" } },
PerUnitCostBasis = "per_unit_cost_basis",
},
}
);
response.Validate();
Expand Down
43 changes: 18 additions & 25 deletions src/Orb.Tests/Service/Customers/CustomerServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ public class CustomerServiceTest : Tests::TestBase
PostalCode = "postal_code",
State = "state",
},
TaxConfiguration = CustomerCreateParamsProperties::TaxConfiguration.Create(
new Customers::NewAvalaraTaxConfiguration()
{
TaxExempt = true,
TaxProvider = NewAvalaraTaxConfigurationProperties::TaxProvider.Avalara,
TaxExemptionCode = "tax_exemption_code",
}
),
TaxConfiguration = new Customers::NewAvalaraTaxConfiguration()
{
TaxExempt = true,
TaxProvider = NewAvalaraTaxConfigurationProperties::TaxProvider.Avalara,
TaxExemptionCode = "tax_exemption_code",
},
TaxID = new Models::CustomerTaxID()
{
Country = CustomerTaxIDProperties::Country.Ad,
Expand Down Expand Up @@ -144,14 +142,12 @@ public class CustomerServiceTest : Tests::TestBase
PostalCode = "postal_code",
State = "state",
},
TaxConfiguration = CustomerUpdateParamsProperties::TaxConfiguration.Create(
new Customers::NewAvalaraTaxConfiguration()
{
TaxExempt = true,
TaxProvider = NewAvalaraTaxConfigurationProperties::TaxProvider.Avalara,
TaxExemptionCode = "tax_exemption_code",
}
),
TaxConfiguration = new Customers::NewAvalaraTaxConfiguration()
{
TaxExempt = true,
TaxProvider = NewAvalaraTaxConfigurationProperties::TaxProvider.Avalara,
TaxExemptionCode = "tax_exemption_code",
},
TaxID = new Models::CustomerTaxID()
{
Country = CustomerTaxIDProperties::Country.Ad,
Expand Down Expand Up @@ -288,15 +284,12 @@ await this.client.Customers.SyncPaymentMethodsFromGatewayByExternalCustomerID(
PostalCode = "postal_code",
State = "state",
},
TaxConfiguration =
CustomerUpdateByExternalIDParamsProperties::TaxConfiguration.Create(
new Customers::NewAvalaraTaxConfiguration()
{
TaxExempt = true,
TaxProvider = NewAvalaraTaxConfigurationProperties::TaxProvider.Avalara,
TaxExemptionCode = "tax_exemption_code",
}
),
TaxConfiguration = new Customers::NewAvalaraTaxConfiguration()
{
TaxExempt = true,
TaxProvider = NewAvalaraTaxConfigurationProperties::TaxProvider.Avalara,
TaxExemptionCode = "tax_exemption_code",
},
TaxID = new Models::CustomerTaxID()
{
Country = CustomerTaxIDProperties::Country.Ad,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ public class DimensionalPriceGroupServiceTest : Tests::TestBase
dimensionalPriceGroup.Validate();
}

[Fact]
public async Tasks::Task Update_Works()
{
var dimensionalPriceGroup = await this.client.DimensionalPriceGroups.Update(
new DimensionalPriceGroups::DimensionalPriceGroupUpdateParams()
{
DimensionalPriceGroupID = "dimensional_price_group_id",
ExternalDimensionalPriceGroupID = "external_dimensional_price_group_id",
Metadata = new() { { "foo", "string" } },
}
);
dimensionalPriceGroup.Validate();
}

[Fact]
public async Tasks::Task List_Works()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,19 @@ await this.client.DimensionalPriceGroups.ExternalDimensionalPriceGroupID.Retriev
);
dimensionalPriceGroup.Validate();
}

[Fact]
public async Tasks::Task Update_Works()
{
var dimensionalPriceGroup =
await this.client.DimensionalPriceGroups.ExternalDimensionalPriceGroupID.Update(
new ExternalDimensionalPriceGroupID::ExternalDimensionalPriceGroupIDUpdateParams()
{
ExternalDimensionalPriceGroupID = "external_dimensional_price_group_id",
ExternalDimensionalPriceGroupID1 = "external_dimensional_price_group_id",
Metadata = new() { { "foo", "string" } },
}
);
dimensionalPriceGroup.Validate();
}
}
36 changes: 17 additions & 19 deletions src/Orb.Tests/Service/Invoices/InvoiceServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,27 @@ public class InvoiceServiceTest : Tests::TestBase
UnitConfig = new Models::UnitConfig() { UnitAmount = "unit_amount" },
},
],
NetTerms = 0,
CustomerID = "4khy3nwzktxv7",
Discount = Models::Discount.Create(
new Models::PercentageDiscount()
{
DiscountType = PercentageDiscountProperties::DiscountType.Percentage,
PercentageDiscount1 = 0.15,
AppliesToPriceIDs = ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"],
Filters =
[
new Models::TransformPriceFilter()
{
Field = TransformPriceFilterProperties::Field.PriceID,
Operator = TransformPriceFilterProperties::Operator.Includes,
Values = ["string"],
},
],
Reason = "reason",
}
),
Discount = new Models::PercentageDiscount()
{
DiscountType = PercentageDiscountProperties::DiscountType.Percentage,
PercentageDiscount1 = 0.15,
AppliesToPriceIDs = ["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"],
Filters =
[
new Models::TransformPriceFilter()
{
Field = TransformPriceFilterProperties::Field.PriceID,
Operator = TransformPriceFilterProperties::Operator.Includes,
Values = ["string"],
},
],
Reason = "reason",
},
ExternalCustomerID = "external-customer-id",
Memo = "An optional memo for my invoice.",
Metadata = new() { { "foo", "string" } },
NetTerms = 0,
WillAutoIssue = false,
}
);
Expand Down
Loading
Loading