Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5849a89
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 16, 2026
551d3d9
feat(client): add `ToString` to `ApiEnum`
stainless-app[bot] Jan 16, 2026
79d3471
chore(internal): simplify imports
stainless-app[bot] Jan 16, 2026
8a87021
feat(client): add Equals and ToString to params
stainless-app[bot] Jan 16, 2026
3bd6cd6
feat(api): api update
stainless-app[bot] Jan 17, 2026
2bc3e43
chore(internal): codegen related update
stainless-app[bot] Jan 20, 2026
d8f27e8
feat(api): api update
stainless-app[bot] Jan 21, 2026
9c7927a
chore(internal): add copy constructor tests
stainless-app[bot] Jan 22, 2026
3f5afb6
chore: change visibility of QueryString() and AddDefaultHeaders
stainless-app[bot] Jan 23, 2026
fed62bb
feat(client): add `ToString` and `Equals` methods
stainless-app[bot] Jan 23, 2026
2cd2dd8
feat(api): api update
stainless-app[bot] Jan 23, 2026
2a92abb
chore(internal): improve HttpResponse qualification
stainless-app[bot] Jan 27, 2026
bb13041
fix(client): handle unions containing unknown types properly
stainless-app[bot] Jan 27, 2026
f9055f0
chore(internal): ignore stainless-internal artifacts
stainless-app[bot] Jan 29, 2026
5635581
fix(client): improve union equality method
stainless-app[bot] Jan 30, 2026
89b717c
feat(api): api update
stainless-app[bot] Feb 3, 2026
830cc0c
feat(api): api update
stainless-app[bot] Feb 10, 2026
ab0951f
fix(client): improve behaviour for comma-delimited binary content in …
stainless-app[bot] Feb 10, 2026
b7e314a
codegen metadata
stainless-app[bot] Feb 11, 2026
0273d50
chore(internal): codegen related update
stainless-app[bot] Feb 11, 2026
50b2cb1
feat(api): api update
stainless-app[bot] Feb 12, 2026
dba544b
feat(api): manual updates
stainless-app[bot] Feb 12, 2026
4116c95
feat(client): add equality and tostring for multipart data
stainless-app[bot] Feb 13, 2026
5c9d8d7
feat(api): api update
stainless-app[bot] Feb 16, 2026
ebe83bc
feat(api): api update
stainless-app[bot] Feb 18, 2026
716231c
feat(api): api update
stainless-app[bot] Feb 19, 2026
72cfd07
chore: update mock server docs
stainless-app[bot] Feb 19, 2026
a198566
refactor(internal): default headers
stainless-app[bot] Feb 20, 2026
f26879d
feat(api): api update
stainless-app[bot] Feb 21, 2026
e4ce03d
chore(docs): add proxy documentation to readme
stainless-app[bot] Feb 23, 2026
c984acb
chore(docs): add undocumented parameters to readme
stainless-app[bot] Feb 24, 2026
e99472a
chore(docs): add missing descriptions
stainless-app[bot] Feb 27, 2026
5820227
feat(api): api update
stainless-app[bot] Feb 27, 2026
e90a3c6
chore(tests): add tests for retry logic
stainless-app[bot] Mar 2, 2026
5c40cf7
docs: remove typo in README.md
stainless-app[bot] Mar 3, 2026
2ee5350
feat(api): api update
stainless-app[bot] Mar 4, 2026
bbd73c1
release: 0.2.0
stainless-app[bot] Mar 4, 2026
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
// For the Prism mock server.
// For the mock server.
"ghcr.io/devcontainers/features/node:1": {}
}
}
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ bin/
obj/
.vs/
.idea/

# do not edit! excludes generated files used internally
.artifacts/
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"
}
8 changes: 4 additions & 4 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
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
configured_endpoints: 139
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-dafe9f726a47bdf7e506af8f10c6abcf4321dcc58106ce2b806a918778dfe2be.yml
openapi_spec_hash: 8e9827f2e8818d011e6afb203adb825f
config_hash: 3279841440b02d4e8303c961d6983492
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# Changelog

## 0.2.0 (2026-03-04)

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 ([2ee5350](https://github.com/orbcorp/orb-csharp/commit/2ee5350e955b6ce5bb90932e250390c1bbd5983c))
* **api:** api update ([5820227](https://github.com/orbcorp/orb-csharp/commit/582022798674964e95d81598f8a039df8aa57c99))
* **api:** api update ([f26879d](https://github.com/orbcorp/orb-csharp/commit/f26879d5478ff24192dd4e4700016da4da6d879c))
* **api:** api update ([716231c](https://github.com/orbcorp/orb-csharp/commit/716231cde616767e62affe993d4251d2897daaf2))
* **api:** api update ([ebe83bc](https://github.com/orbcorp/orb-csharp/commit/ebe83bc63b23dd2c2f4b86005d8c50d579c5fd86))
* **api:** api update ([5c9d8d7](https://github.com/orbcorp/orb-csharp/commit/5c9d8d785b6c75e97c0d5f08227e42e10b5da3c8))
* **api:** api update ([50b2cb1](https://github.com/orbcorp/orb-csharp/commit/50b2cb1b1e7ca97069802de357b08a09fc60f95c))
* **api:** api update ([830cc0c](https://github.com/orbcorp/orb-csharp/commit/830cc0c641572bcc8fdac8b7b754eb7ab10c0f5e))
* **api:** api update ([89b717c](https://github.com/orbcorp/orb-csharp/commit/89b717cfbece7a4cf336964f84eebe2f9f9a2742))
* **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))
* **api:** manual updates ([dba544b](https://github.com/orbcorp/orb-csharp/commit/dba544be21d0115fd6ee8b3399fde64b16bcc3f8))
* **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 equality and tostring for multipart data ([4116c95](https://github.com/orbcorp/orb-csharp/commit/4116c95ff4635a27f7e5132a3a17c413f4853efc))
* **client:** add Equals and ToString to params ([8a87021](https://github.com/orbcorp/orb-csharp/commit/8a870218bc1eebf9e4430ed69fedc206e7b9f25c))


### Bug Fixes

* **client:** handle unions containing unknown types properly ([bb13041](https://github.com/orbcorp/orb-csharp/commit/bb13041f80e071a51a8aa845c2a5b2e720e4cd75))
* **client:** improve behaviour for comma-delimited binary content in multipart requests ([ab0951f](https://github.com/orbcorp/orb-csharp/commit/ab0951f3e4a8d9334991eb1c4cb5ca6d43039f10))
* **client:** improve union equality method ([5635581](https://github.com/orbcorp/orb-csharp/commit/563558107f3fa7d5e947ecf758875794c3e04dff))


### Chores

* change visibility of QueryString() and AddDefaultHeaders ([3f5afb6](https://github.com/orbcorp/orb-csharp/commit/3f5afb6e4e6d0c32a52e82c68c219391a09a0313))
* **docs:** add missing descriptions ([e99472a](https://github.com/orbcorp/orb-csharp/commit/e99472a25dbbc10db210c0f54234fc5c2a26b25e))
* **docs:** add proxy documentation to readme ([e4ce03d](https://github.com/orbcorp/orb-csharp/commit/e4ce03dc208398d10aa351959e9b9cf8d679672d))
* **docs:** add undocumented parameters to readme ([c984acb](https://github.com/orbcorp/orb-csharp/commit/c984acb5f59fb3935e80abe786a1634465e862fe))
* **internal:** add copy constructor tests ([9c7927a](https://github.com/orbcorp/orb-csharp/commit/9c7927a2079895ffcd40cc12611748f7b61bad02))
* **internal:** codegen related update ([0273d50](https://github.com/orbcorp/orb-csharp/commit/0273d508b173a0b758832ff31ea2ce0cd0b6f5e5))
* **internal:** codegen related update ([2bc3e43](https://github.com/orbcorp/orb-csharp/commit/2bc3e436b724ff58d3191ea1c4632be595a9e5f5))
* **internal:** ignore stainless-internal artifacts ([f9055f0](https://github.com/orbcorp/orb-csharp/commit/f9055f0118384c77b1ef687b756e5a49f3f417dc))
* **internal:** improve HttpResponse qualification ([2a92abb](https://github.com/orbcorp/orb-csharp/commit/2a92abb2b86492e4018b9c8fa5d75ad9486d55fc))
* **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))
* **tests:** add tests for retry logic ([e90a3c6](https://github.com/orbcorp/orb-csharp/commit/e90a3c65eb8c36a7016a1673f3afd3bfb04487bf))
* update mock server docs ([72cfd07](https://github.com/orbcorp/orb-csharp/commit/72cfd078f36c6087b0ce6c30037dd2fe2d9d1d7d))


### Documentation

* remove typo in README.md ([5c40cf7](https://github.com/orbcorp/orb-csharp/commit/5c40cf77147cf374d8df1cf69f593ede2966ba9d))


### Refactors

* **internal:** default headers ([a198566](https://github.com/orbcorp/orb-csharp/commit/a198566976ed1faab7db589e8755162e567ee70f))

## 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
135 changes: 133 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ The SDK throws custom unchecked exception types:

Additionally, all 4xx errors inherit from `Orb4xxException`.

false

- `OrbIOException`: I/O networking errors.

- `OrbInvalidDataException`: Failure to interpret successfully parsed data. For example, when accessing a property that's supposed to be required, but the API unexpectedly omitted it from the response.
Expand Down Expand Up @@ -253,10 +251,143 @@ var customer = await client
Console.WriteLine(customer);
```

### Proxies

To route requests through a proxy, configure your client with a custom [`HttpClient`](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=net-10.0):

```csharp
using System.Net;
using System.Net.Http;
using Orb;

var httpClient = new HttpClient
(
new HttpClientHandler
{
Proxy = new WebProxy("https://example.com:8080")
}
);

OrbClient client = new() { HttpClient = httpClient };
```

## Undocumented API functionality

The SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.

### Parameters

To set undocumented parameters, a constructor exists that accepts dictionaries for additional header, query, and body values. If the method type doesn't support request bodies (e.g. `GET` requests), the constructor will only accept a header and query dictionary.

```csharp
using System.Collections.Generic;
using System.Text.Json;
using Orb.Models.Customers;

CustomerCreateParams parameters = new
(
rawHeaderData: new Dictionary<string, JsonElement>()
{
{ "Custom-Header", JsonSerializer.SerializeToElement(42) }
},

rawQueryData: new Dictionary<string, JsonElement>()
{
{ "custom_query_param", JsonSerializer.SerializeToElement(42) }
},

rawBodyData: new Dictionary<string, JsonElement>()
{
{ "custom_body_param", JsonSerializer.SerializeToElement(42) }
}
)
{
// Documented properties can still be added here.
// In case of conflict, these parameters take precedence over the custom parameters.
AutoCollection = true
};
```

The raw parameters can also be accessed through the `RawHeaderData`, `RawQueryData`, and `RawBodyData` (if available) properties.

This can also be used to set a documented parameter to an undocumented or not yet supported _value_, as long as the parameter is optional. If the parameter is required, omitting its `init` property will result in a compile-time error. To work around this, the `FromRawUnchecked` method can be used:

```csharp
using System.Collections.Generic;
using System.Text.Json;
using Orb.Models.Customers;

var parameters = CustomerCreateParams.FromRawUnchecked
(

rawHeaderData: new Dictionary<string, JsonElement>(),
rawQueryData: new Dictionary<string, JsonElement>(),
rawBodyData: new Dictionary<string, JsonElement>
{
{
"email",
JsonSerializer.SerializeToElement("custom value")
}
}
);
```

### Nested Parameters

Undocumented properties, or undocumented values of documented properties, on nested parameters can be set similarly, using a dictionary in the constructor of the nested parameter.

```csharp
using System.Collections.Generic;
using System.Text.Json;
using Orb.Models.Customers;

CustomerCreateParams parameters = new()
{
AccountingSyncConfiguration = new
(
new Dictionary<string, JsonElement>
{
{ "custom_nested_param", JsonSerializer.SerializeToElement(42) }
}
)
};
```

Required properties on the nested parameter can also be changed or omitted using the `FromRawUnchecked` method:

```csharp
using System.Collections.Generic;
using System.Text.Json;
using Orb.Models.Customers;

CustomerCreateParams parameters = new()
{
AccountingSyncConfiguration = NewAccountingSyncConfiguration.FromRawUnchecked
(
new Dictionary<string, JsonElement>
{
{ "required_property", JsonSerializer.SerializeToElement("custom value") }
}
)
};
```

### Response properties

To access undocumented response properties, the `RawData` property can be used:

```csharp
using System.Text.Json;

var response = client.Customers.Create(parameters)
if (response.RawData.TryGetValue("my_custom_key", out JsonElement value))
{
// Do something with `value`
}
```

`RawData` is a `IReadonlyDictionary<string, JsonElement>`. It holds the full data received from the API server.

### Response validation

In rare cases, the API may return a response that doesn't match the expected type. For example, the SDK may expect a property to contain a `string`, but the API could return something else.
Expand Down
Loading
Loading