Skip to content

Commit 4793ec0

Browse files
fix(internal): remove roundtrip tests for multipart params
1 parent ebf0a3e commit 4793ec0

26 files changed

+90
-88
lines changed

src/Orb/Core/ClientOptions.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ public string BaseUrl
4040
}
4141

4242
/// <summary>
43-
/// Whether to validate every response before returning it.
43+
/// Whether to validate response bodies before returning them.
4444
///
45-
/// <para>Defaults to false, which means the shape of the response will not be
46-
/// validated upfront. Instead, validation will only occur for the parts of the
47-
/// response that are accessed.</para>
45+
/// <para>Defaults to false, which means the shape of the response body will not be validated upfront.
46+
/// Instead, validation will only occur for the parts of the response body that are accessed.</para>
47+
///
48+
/// <para>Note that when set to true, the response body is only validated if the response is
49+
/// deserialized. Methods that don't eagerly deserialize the response, such as those on
50+
/// <see cref="IOrbClient.WithRawResponse"/>, don't perform validation until deserialization
51+
/// is triggered.</para>
4852
/// </summary>
4953
public bool ResponseValidation { get; set; } = false;
5054

src/Orb/IOrbClient.cs

Lines changed: 10 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -21,56 +21,19 @@ namespace Orb;
2121
/// </summary>
2222
public interface IOrbClient : IDisposable
2323
{
24-
/// <summary>
25-
/// The HTTP client to use for making requests in the SDK.
26-
/// </summary>
24+
/// <inheritdoc cref="ClientOptions.HttpClient" />
2725
HttpClient HttpClient { get; init; }
2826

29-
/// <summary>
30-
/// The base URL to use for every request.
31-
///
32-
/// <para>Defaults to the production environment: <see cref="EnvironmentUrl.Production"/></para>
33-
/// </summary>
27+
/// <inheritdoc cref="ClientOptions.BaseUrl" />
3428
string BaseUrl { get; init; }
3529

36-
/// <summary>
37-
/// Whether to validate every response before returning it.
38-
///
39-
/// <para>Defaults to false, which means the shape of the response will not be
40-
/// validated upfront. Instead, validation will only occur for the parts of the
41-
/// response that are accessed.</para>
42-
/// </summary>
30+
/// <inheritdoc cref="ClientOptions.ResponseValidation" />
4331
bool ResponseValidation { get; init; }
4432

45-
/// <summary>
46-
/// The maximum number of times to retry failed requests, with a short exponential backoff between requests.
47-
///
48-
/// <para>
49-
/// Only the following error types are retried:
50-
/// <list type="bullet">
51-
/// <item>Connection errors (for example, due to a network connectivity problem)</item>
52-
/// <item>408 Request Timeout</item>
53-
/// <item>409 Conflict</item>
54-
/// <item>429 Rate Limit</item>
55-
/// <item>5xx Internal</item>
56-
/// </list>
57-
/// </para>
58-
///
59-
/// <para>The API may also explicitly instruct the SDK to retry or not retry a request.</para>
60-
///
61-
/// <para>Defaults to 2 when null. Set to 0 to
62-
/// disable retries, which also ignores API instructions to retry.</para>
63-
/// </summary>
33+
/// <inheritdoc cref="ClientOptions.MaxRetries" />
6434
int? MaxRetries { get; init; }
6535

66-
/// <summary>
67-
/// Sets the maximum time allowed for a complete HTTP call, not including retries.
68-
///
69-
/// <para>This includes resolving DNS, connecting, writing the request body, server processing, as
70-
/// well as reading the response body.</para>
71-
///
72-
/// <para>Defaults to <c>TimeSpan.FromMinutes(1)</c> when null.</para>
73-
/// </summary>
36+
/// <inheritdoc cref="ClientOptions.Timeout" />
7437
TimeSpan? Timeout { get; init; }
7538

7639
string ApiKey { get; init; }
@@ -130,56 +93,19 @@ public interface IOrbClient : IDisposable
13093
/// </summary>
13194
public interface IOrbClientWithRawResponse : IDisposable
13295
{
133-
/// <summary>
134-
/// The HTTP client to use for making requests in the SDK.
135-
/// </summary>
96+
/// <inheritdoc cref="ClientOptions.HttpClient" />
13697
HttpClient HttpClient { get; init; }
13798

138-
/// <summary>
139-
/// The base URL to use for every request.
140-
///
141-
/// <para>Defaults to the production environment: <see cref="EnvironmentUrl.Production"/></para>
142-
/// </summary>
99+
/// <inheritdoc cref="ClientOptions.BaseUrl" />
143100
string BaseUrl { get; init; }
144101

145-
/// <summary>
146-
/// Whether to validate every response before returning it.
147-
///
148-
/// <para>Defaults to false, which means the shape of the response will not be
149-
/// validated upfront. Instead, validation will only occur for the parts of the
150-
/// response that are accessed.</para>
151-
/// </summary>
102+
/// <inheritdoc cref="ClientOptions.ResponseValidation" />
152103
bool ResponseValidation { get; init; }
153104

154-
/// <summary>
155-
/// The maximum number of times to retry failed requests, with a short exponential backoff between requests.
156-
///
157-
/// <para>
158-
/// Only the following error types are retried:
159-
/// <list type="bullet">
160-
/// <item>Connection errors (for example, due to a network connectivity problem)</item>
161-
/// <item>408 Request Timeout</item>
162-
/// <item>409 Conflict</item>
163-
/// <item>429 Rate Limit</item>
164-
/// <item>5xx Internal</item>
165-
/// </list>
166-
/// </para>
167-
///
168-
/// <para>The API may also explicitly instruct the SDK to retry or not retry a request.</para>
169-
///
170-
/// <para>Defaults to 2 when null. Set to 0 to
171-
/// disable retries, which also ignores API instructions to retry.</para>
172-
/// </summary>
105+
/// <inheritdoc cref="ClientOptions.MaxRetries" />
173106
int? MaxRetries { get; init; }
174107

175-
/// <summary>
176-
/// Sets the maximum time allowed for a complete HTTP call, not including retries.
177-
///
178-
/// <para>This includes resolving DNS, connecting, writing the request body, server processing, as
179-
/// well as reading the response body.</para>
180-
///
181-
/// <para>Defaults to <c>TimeSpan.FromMinutes(1)</c> when null.</para>
182-
/// </summary>
108+
/// <inheritdoc cref="ClientOptions.Timeout" />
183109
TimeSpan? Timeout { get; init; }
184110

185111
string ApiKey { get; init; }

src/Orb/Models/Alerts/AlertListPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.Alerts;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="IAlertService.List(AlertListParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class AlertListPage(
1316
IAlertServiceWithRawResponse service,
1417
AlertListParams parameters,

src/Orb/Models/Coupons/CouponListPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.Coupons;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="ICouponService.List(CouponListParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class CouponListPage(
1316
ICouponServiceWithRawResponse service,
1417
CouponListParams parameters,

src/Orb/Models/Coupons/Subscriptions/SubscriptionListPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
namespace Orb.Models.Coupons.Subscriptions;
1212

13+
/// <summary>
14+
/// A single page from the paginated endpoint that <see cref="ISubscriptionService.List(SubscriptionListParams, CancellationToken)"/> queries.
15+
/// </summary>
1316
public sealed class SubscriptionListPage(
1417
ISubscriptionServiceWithRawResponse service,
1518
SubscriptionListParams parameters,

src/Orb/Models/CreditNotes/CreditNoteListPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.CreditNotes;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="ICreditNoteService.List(CreditNoteListParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class CreditNoteListPage(
1316
ICreditNoteServiceWithRawResponse service,
1417
CreditNoteListParams parameters,

src/Orb/Models/Customers/BalanceTransactions/BalanceTransactionListPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.Customers.BalanceTransactions;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="IBalanceTransactionService.List(BalanceTransactionListParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class BalanceTransactionListPage(
1316
IBalanceTransactionServiceWithRawResponse service,
1417
BalanceTransactionListParams parameters,

src/Orb/Models/Customers/Credits/CreditListByExternalIDPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.Customers.Credits;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="ICreditService.ListByExternalID(CreditListByExternalIDParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class CreditListByExternalIDPage(
1316
ICreditServiceWithRawResponse service,
1417
CreditListByExternalIDParams parameters,

src/Orb/Models/Customers/Credits/CreditListPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.Customers.Credits;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="ICreditService.List(CreditListParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class CreditListPage(
1316
ICreditServiceWithRawResponse service,
1417
CreditListParams parameters,

src/Orb/Models/Customers/Credits/Ledger/LedgerListByExternalIDPage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
namespace Orb.Models.Customers.Credits.Ledger;
1111

12+
/// <summary>
13+
/// A single page from the paginated endpoint that <see cref="ILedgerService.ListByExternalID(LedgerListByExternalIDParams, CancellationToken)"/> queries.
14+
/// </summary>
1215
public sealed class LedgerListByExternalIDPage(
1316
ILedgerServiceWithRawResponse service,
1417
LedgerListByExternalIDParams parameters,

0 commit comments

Comments
 (0)