diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.GetBillingPlan.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.GetBillingPlan.g.cs
new file mode 100644
index 0000000..247383d
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.GetBillingPlan.g.cs
@@ -0,0 +1,510 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingPlansClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_GetBillingPlanServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_GetBillingPlanSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_GetBillingPlanSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_GetBillingPlanSecurityRequirement0,
+ };
+ partial void PrepareGetBillingPlanArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string id);
+ partial void PrepareGetBillingPlanRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string id);
+ partial void ProcessGetBillingPlanResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetBillingPlanResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get a billing plan
+ /// Returns an active billing plan by slug, including its products, prices, and quantity rules. This endpoint is public.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetBillingPlanAsync(
+ string id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetBillingPlanAsResponseAsync(
+ id: id,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get a billing plan
+ /// Returns an active billing plan by slug, including its products, prices, and quantity rules. This endpoint is public.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetBillingPlanAsResponseAsync(
+ string id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetBillingPlanArguments(
+ httpClient: HttpClient,
+ id: ref id);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetBillingPlanSecurityRequirements,
+ operationName: "GetBillingPlanAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: $"/plans/{id}",
+ baseUri: ResolveBaseUri(
+ servers: s_GetBillingPlanServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetBillingPlanRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ id: id!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingPlan",
+ methodName: "GetBillingPlanAsync",
+ pathTemplate: "$\"/plans/{id}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingPlan",
+ methodName: "GetBillingPlanAsync",
+ pathTemplate: "$\"/plans/{id}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingPlan",
+ methodName: "GetBillingPlanAsync",
+ pathTemplate: "$\"/plans/{id}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetBillingPlanResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingPlan",
+ methodName: "GetBillingPlanAsync",
+ pathTemplate: "$\"/plans/{id}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingPlan",
+ methodName: "GetBillingPlanAsync",
+ pathTemplate: "$\"/plans/{id}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The requested billing resource does not exist for the current team.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::ResembleAI.BillingError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetBillingPlanResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingPlanResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingPlanResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.AccountClient.GetBillingUsage.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.ListBillingPlans.g.cs
similarity index 79%
rename from src/libs/ResembleAI/Generated/ResembleAI.AccountClient.GetBillingUsage.g.cs
rename to src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.ListBillingPlans.g.cs
index 7d78f1d..0e7d27c 100644
--- a/src/libs/ResembleAI/Generated/ResembleAI.AccountClient.GetBillingUsage.g.cs
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.ListBillingPlans.g.cs
@@ -3,10 +3,10 @@
namespace ResembleAI
{
- public partial class AccountClient
+ public partial class BillingPlansClient
{
- private static readonly global::ResembleAI.AutoSDKServer[] s_GetBillingUsageServers = new global::ResembleAI.AutoSDKServer[]
+ private static readonly global::ResembleAI.AutoSDKServer[] s_ListBillingPlansServers = new global::ResembleAI.AutoSDKServer[]
{ new global::ResembleAI.AutoSDKServer(
id: "https-app-resemble-ai-api-v2",
name: "app.resemble.ai api v2",
@@ -15,7 +15,7 @@ public partial class AccountClient
};
- private static readonly global::ResembleAI.EndPointSecurityRequirement s_GetBillingUsageSecurityRequirement0 =
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_ListBillingPlansSecurityRequirement0 =
new global::ResembleAI.EndPointSecurityRequirement
{
Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
@@ -29,36 +29,36 @@ public partial class AccountClient
},
},
};
- private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_GetBillingUsageSecurityRequirements =
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_ListBillingPlansSecurityRequirements =
new global::ResembleAI.EndPointSecurityRequirement[]
- { s_GetBillingUsageSecurityRequirement0,
+ { s_ListBillingPlansSecurityRequirement0,
};
- partial void PrepareGetBillingUsageArguments(
+ partial void PrepareListBillingPlansArguments(
global::System.Net.Http.HttpClient httpClient);
- partial void PrepareGetBillingUsageRequest(
+ partial void PrepareListBillingPlansRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
- partial void ProcessGetBillingUsageResponse(
+ partial void ProcessListBillingPlansResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessGetBillingUsageResponseContent(
+ partial void ProcessListBillingPlansResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
- /// Get billing usage
- /// Get billing and usage information
+ /// List billing plans
+ /// Returns all active self-serve plans, their products, prices, and plan-specific quantity rules. This endpoint is public.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task GetBillingUsageAsync(
+ public async global::System.Threading.Tasks.Task ListBillingPlansAsync(
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
- var __response = await GetBillingUsageAsResponseAsync(
+ var __response = await ListBillingPlansAsResponseAsync(
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -66,26 +66,26 @@ partial void ProcessGetBillingUsageResponseContent(
return __response.Body;
}
///
- /// Get billing usage
- /// Get billing and usage information
+ /// List billing plans
+ /// Returns all active self-serve plans, their products, prices, and plan-specific quantity rules. This endpoint is public.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task> GetBillingUsageAsResponseAsync(
+ public async global::System.Threading.Tasks.Task> ListBillingPlansAsResponseAsync(
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
- PrepareGetBillingUsageArguments(
+ PrepareListBillingPlansArguments(
httpClient: HttpClient);
var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_GetBillingUsageSecurityRequirements,
- operationName: "GetBillingUsageAsync");
+ securityRequirements: s_ListBillingPlansSecurityRequirements,
+ operationName: "ListBillingPlansAsync");
using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -105,9 +105,9 @@ partial void ProcessGetBillingUsageResponseContent(
{
var __pathBuilder = new global::ResembleAI.PathBuilder(
- path: "/account/billing_usage",
+ path: "/plans",
baseUri: ResolveBaseUri(
- servers: s_GetBillingUsageServers,
+ servers: s_ListBillingPlansServers,
defaultBaseUrl: "https://app.resemble.ai/api/v2"));
var __path = __pathBuilder.ToString();
__path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -146,7 +146,7 @@ partial void ProcessGetBillingUsageResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareGetBillingUsageRequest(
+ PrepareListBillingPlansRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest);
@@ -165,9 +165,9 @@ partial void ProcessGetBillingUsageResponseContent(
await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetBillingUsage",
- methodName: "GetBillingUsageAsync",
- pathTemplate: "\"/account/billing_usage\"",
+ operationId: "ListBillingPlans",
+ methodName: "ListBillingPlansAsync",
+ pathTemplate: "\"/plans\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -199,9 +199,9 @@ partial void ProcessGetBillingUsageResponseContent(
await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetBillingUsage",
- methodName: "GetBillingUsageAsync",
- pathTemplate: "\"/account/billing_usage\"",
+ operationId: "ListBillingPlans",
+ methodName: "ListBillingPlansAsync",
+ pathTemplate: "\"/plans\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -240,9 +240,9 @@ partial void ProcessGetBillingUsageResponseContent(
await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetBillingUsage",
- methodName: "GetBillingUsageAsync",
- pathTemplate: "\"/account/billing_usage\"",
+ operationId: "ListBillingPlans",
+ methodName: "ListBillingPlansAsync",
+ pathTemplate: "\"/plans\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -280,7 +280,7 @@ partial void ProcessGetBillingUsageResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessGetBillingUsageResponse(
+ ProcessListBillingPlansResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -288,9 +288,9 @@ partial void ProcessGetBillingUsageResponseContent(
await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetBillingUsage",
- methodName: "GetBillingUsageAsync",
- pathTemplate: "\"/account/billing_usage\"",
+ operationId: "ListBillingPlans",
+ methodName: "ListBillingPlansAsync",
+ pathTemplate: "\"/plans\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -310,9 +310,9 @@ partial void ProcessGetBillingUsageResponseContent(
await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetBillingUsage",
- methodName: "GetBillingUsageAsync",
- pathTemplate: "\"/account/billing_usage\"",
+ operationId: "ListBillingPlans",
+ methodName: "ListBillingPlansAsync",
+ pathTemplate: "\"/plans\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -327,6 +327,43 @@ partial void ProcessGetBillingUsageResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
if (__effectiveReadResponseAsString)
{
@@ -340,7 +377,7 @@ partial void ProcessGetBillingUsageResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessGetBillingUsageResponseContent(
+ ProcessListBillingPlansResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -349,9 +386,9 @@ partial void ProcessGetBillingUsageResponseContent(
{
__response.EnsureSuccessStatusCode();
- var __value = global::ResembleAI.AccountGetBillingUsageResponse200.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::ResembleAI.BillingPlansResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
- return new global::ResembleAI.AutoSDKHttpResponse(
+ return new global::ResembleAI.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
@@ -381,9 +418,9 @@ partial void ProcessGetBillingUsageResponseContent(
#endif
).ConfigureAwait(false);
- var __value = await global::ResembleAI.AccountGetBillingUsageResponse200.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::ResembleAI.BillingPlansResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
- return new global::ResembleAI.AutoSDKHttpResponse(
+ return new global::ResembleAI.AutoSDKHttpResponse(
statusCode: __response.StatusCode,
headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.g.cs
new file mode 100644
index 0000000..c454be5
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingPlansClient.g.cs
@@ -0,0 +1,175 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class BillingPlansClient : global::ResembleAI.IBillingPlansClient, global::System.IDisposable
+ {
+ ///
+ ///
+ ///
+ public const string DefaultBaseUrl = "https://app.resemble.ai/api/v2";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => HttpClient.BaseAddress;
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ internal global::ResembleAI.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::ResembleAI.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::ResembleAI.SourceGenerationContext.Default;
+
+
+ ///
+ /// Creates a new instance of the BillingPlansClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingPlansClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BillingPlansClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingPlansClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::ResembleAI.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BillingPlansClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingPlansClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::ResembleAI.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::ResembleAI.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+
+
+ private global::System.Uri? ResolveBaseUri(
+ global::ResembleAI.AutoSDKServer[] servers,
+ string defaultBaseUrl)
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ if (AutoSDKServerConfiguration.SelectedServer is global::ResembleAI.AutoSDKServer selectedServer)
+ {
+ foreach (var server in servers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server.Uri;
+ }
+ }
+ }
+
+ if (servers.Length > 0)
+ {
+ return servers[0].Uri;
+ }
+
+ return string.IsNullOrWhiteSpace(defaultBaseUrl)
+ ? HttpClient.BaseAddress
+ : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.ChangeBillingPlan.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.ChangeBillingPlan.g.cs
new file mode 100644
index 0000000..d205b28
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.ChangeBillingPlan.g.cs
@@ -0,0 +1,734 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingSubscriptionsClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_ChangeBillingPlanServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_ChangeBillingPlanSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_ChangeBillingPlanSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_ChangeBillingPlanSecurityRequirement0,
+ };
+ partial void PrepareChangeBillingPlanArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::ResembleAI.BillingChangePlanRequest request);
+ partial void PrepareChangeBillingPlanRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::ResembleAI.BillingChangePlanRequest request);
+ partial void ProcessChangeBillingPlanResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessChangeBillingPlanResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Change the current subscription plan
+ /// Changes a self-serve subscription to another active plan with proration. Optional product quantities are absolute quantities on the destination plan.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ChangeBillingPlanAsync(
+
+ global::ResembleAI.BillingChangePlanRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ChangeBillingPlanAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Change the current subscription plan
+ /// Changes a self-serve subscription to another active plan with proration. Optional product quantities are absolute quantities on the destination plan.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ChangeBillingPlanAsResponseAsync(
+
+ global::ResembleAI.BillingChangePlanRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareChangeBillingPlanArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ChangeBillingPlanSecurityRequirements,
+ operationName: "ChangeBillingPlanAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/subscription/change_plan",
+ baseUri: ResolveBaseUri(
+ servers: s_ChangeBillingPlanServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: new global::System.Net.Http.HttpMethod("PATCH"),
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareChangeBillingPlanRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ChangeBillingPlan",
+ methodName: "ChangeBillingPlanAsync",
+ pathTemplate: "\"/subscription/change_plan\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ChangeBillingPlan",
+ methodName: "ChangeBillingPlanAsync",
+ pathTemplate: "\"/subscription/change_plan\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ChangeBillingPlan",
+ methodName: "ChangeBillingPlanAsync",
+ pathTemplate: "\"/subscription/change_plan\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessChangeBillingPlanResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ChangeBillingPlan",
+ methodName: "ChangeBillingPlanAsync",
+ pathTemplate: "\"/subscription/change_plan\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ChangeBillingPlan",
+ methodName: "ChangeBillingPlanAsync",
+ pathTemplate: "\"/subscription/change_plan\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request could not be parsed or contains invalid parameters.
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::ResembleAI.BillingError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Additional customer authentication is required before the billing change can complete.
+ if ((int)__response.StatusCode == 402)
+ {
+ string? __content_402 = null;
+ global::System.Exception? __exception_402 = null;
+ global::ResembleAI.BillingPaymentActionRequired? __value_402 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_402 = global::ResembleAI.BillingPaymentActionRequired.FromJson(__content_402, JsonSerializerContext);
+ }
+ else
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_402 = global::ResembleAI.BillingPaymentActionRequired.FromJson(__content_402, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_402 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_402 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_402,
+ responseBody: __content_402,
+ responseObject: __value_402,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The requested billing resource does not exist for the current team.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::ResembleAI.BillingError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The request was understood but violates a billing rule.
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessChangeBillingPlanResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingSubscriptionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Change the current subscription plan
+ /// Changes a self-serve subscription to another active plan with proration. Optional product quantities are absolute quantities on the destination plan.
+ ///
+ ///
+ ///
+ /// Optional map of product slugs to desired quantities on the new plan.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ChangeBillingPlanAsync(
+ string planSlug,
+ global::System.Collections.Generic.Dictionary? productQuantities = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::ResembleAI.BillingChangePlanRequest
+ {
+ PlanSlug = planSlug,
+ ProductQuantities = productQuantities,
+ };
+
+ return await ChangeBillingPlanAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.ConfirmBillingSubscriptionPayment.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.ConfirmBillingSubscriptionPayment.g.cs
new file mode 100644
index 0000000..6aa0c96
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.ConfirmBillingSubscriptionPayment.g.cs
@@ -0,0 +1,694 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingSubscriptionsClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_ConfirmBillingSubscriptionPaymentServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_ConfirmBillingSubscriptionPaymentSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_ConfirmBillingSubscriptionPaymentSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_ConfirmBillingSubscriptionPaymentSecurityRequirement0,
+ };
+ partial void PrepareConfirmBillingSubscriptionPaymentArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::ResembleAI.BillingConfirmPaymentRequest request);
+ partial void PrepareConfirmBillingSubscriptionPaymentRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::ResembleAI.BillingConfirmPaymentRequest request);
+ partial void ProcessConfirmBillingSubscriptionPaymentResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessConfirmBillingSubscriptionPaymentResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Confirm a subscription payment
+ /// Synchronizes the subscription after the customer completes the additional payment authentication requested by a quantity or plan change.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ConfirmBillingSubscriptionPaymentAsync(
+
+ global::ResembleAI.BillingConfirmPaymentRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ConfirmBillingSubscriptionPaymentAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Confirm a subscription payment
+ /// Synchronizes the subscription after the customer completes the additional payment authentication requested by a quantity or plan change.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ConfirmBillingSubscriptionPaymentAsResponseAsync(
+
+ global::ResembleAI.BillingConfirmPaymentRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareConfirmBillingSubscriptionPaymentArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ConfirmBillingSubscriptionPaymentSecurityRequirements,
+ operationName: "ConfirmBillingSubscriptionPaymentAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/subscription/confirm_payment",
+ baseUri: ResolveBaseUri(
+ servers: s_ConfirmBillingSubscriptionPaymentServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareConfirmBillingSubscriptionPaymentRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConfirmBillingSubscriptionPayment",
+ methodName: "ConfirmBillingSubscriptionPaymentAsync",
+ pathTemplate: "\"/subscription/confirm_payment\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConfirmBillingSubscriptionPayment",
+ methodName: "ConfirmBillingSubscriptionPaymentAsync",
+ pathTemplate: "\"/subscription/confirm_payment\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConfirmBillingSubscriptionPayment",
+ methodName: "ConfirmBillingSubscriptionPaymentAsync",
+ pathTemplate: "\"/subscription/confirm_payment\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessConfirmBillingSubscriptionPaymentResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConfirmBillingSubscriptionPayment",
+ methodName: "ConfirmBillingSubscriptionPaymentAsync",
+ pathTemplate: "\"/subscription/confirm_payment\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ConfirmBillingSubscriptionPayment",
+ methodName: "ConfirmBillingSubscriptionPaymentAsync",
+ pathTemplate: "\"/subscription/confirm_payment\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request could not be parsed or contains invalid parameters.
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::ResembleAI.BillingError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The requested billing resource does not exist for the current team.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::ResembleAI.BillingError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The request was understood but violates a billing rule.
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessConfirmBillingSubscriptionPaymentResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingSubscriptionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Confirm a subscription payment
+ /// Synchronizes the subscription after the customer completes the additional payment authentication requested by a quantity or plan change.
+ ///
+ ///
+ /// Payment intent identifier completed by the customer.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ConfirmBillingSubscriptionPaymentAsync(
+ string paymentIntentId,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::ResembleAI.BillingConfirmPaymentRequest
+ {
+ PaymentIntentId = paymentIntentId,
+ };
+
+ return await ConfirmBillingSubscriptionPaymentAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.GetBillingSubscription.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.GetBillingSubscription.g.cs
new file mode 100644
index 0000000..73ae7f3
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.GetBillingSubscription.g.cs
@@ -0,0 +1,538 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingSubscriptionsClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_GetBillingSubscriptionServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_GetBillingSubscriptionSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_GetBillingSubscriptionSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_GetBillingSubscriptionSecurityRequirement0,
+ };
+ partial void PrepareGetBillingSubscriptionArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareGetBillingSubscriptionRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessGetBillingSubscriptionResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetBillingSubscriptionResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get the current subscription
+ /// Returns the current team's active, past-due, or delinquent subscription. Returns a null subscription when no customer-visible subscription exists.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetBillingSubscriptionAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetBillingSubscriptionAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get the current subscription
+ /// Returns the current team's active, past-due, or delinquent subscription. Returns a null subscription when no customer-visible subscription exists.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetBillingSubscriptionAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetBillingSubscriptionArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetBillingSubscriptionSecurityRequirements,
+ operationName: "GetBillingSubscriptionAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/subscription",
+ baseUri: ResolveBaseUri(
+ servers: s_GetBillingSubscriptionServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetBillingSubscriptionRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingSubscription",
+ methodName: "GetBillingSubscriptionAsync",
+ pathTemplate: "\"/subscription\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingSubscription",
+ methodName: "GetBillingSubscriptionAsync",
+ pathTemplate: "\"/subscription\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingSubscription",
+ methodName: "GetBillingSubscriptionAsync",
+ pathTemplate: "\"/subscription\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetBillingSubscriptionResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingSubscription",
+ methodName: "GetBillingSubscriptionAsync",
+ pathTemplate: "\"/subscription\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingSubscription",
+ methodName: "GetBillingSubscriptionAsync",
+ pathTemplate: "\"/subscription\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetBillingSubscriptionResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingSubscriptionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.UpdateBillingSubscriptionProducts.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.UpdateBillingSubscriptionProducts.g.cs
new file mode 100644
index 0000000..00a5004
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.UpdateBillingSubscriptionProducts.g.cs
@@ -0,0 +1,729 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingSubscriptionsClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_UpdateBillingSubscriptionProductsServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_UpdateBillingSubscriptionProductsSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_UpdateBillingSubscriptionProductsSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_UpdateBillingSubscriptionProductsSecurityRequirement0,
+ };
+ partial void PrepareUpdateBillingSubscriptionProductsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::ResembleAI.BillingUpdateProductsRequest request);
+ partial void PrepareUpdateBillingSubscriptionProductsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::ResembleAI.BillingUpdateProductsRequest request);
+ partial void ProcessUpdateBillingSubscriptionProductsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateBillingSubscriptionProductsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update subscription product quantities
+ /// Updates one or more adjustable subscription products atomically. Each `new_quantity` is the desired absolute total, not an increment. A product is adjustable when its category is `subscription` and its `plan_product.allow_additional_usage` value is true. Quantities must remain within the plan's minimum and maximum and cannot be reduced below `consumed_quantity`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UpdateBillingSubscriptionProductsAsync(
+
+ global::ResembleAI.BillingUpdateProductsRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateBillingSubscriptionProductsAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update subscription product quantities
+ /// Updates one or more adjustable subscription products atomically. Each `new_quantity` is the desired absolute total, not an increment. A product is adjustable when its category is `subscription` and its `plan_product.allow_additional_usage` value is true. Quantities must remain within the plan's minimum and maximum and cannot be reduced below `consumed_quantity`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateBillingSubscriptionProductsAsResponseAsync(
+
+ global::ResembleAI.BillingUpdateProductsRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUpdateBillingSubscriptionProductsArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateBillingSubscriptionProductsSecurityRequirements,
+ operationName: "UpdateBillingSubscriptionProductsAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/subscription/products",
+ baseUri: ResolveBaseUri(
+ servers: s_UpdateBillingSubscriptionProductsServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: new global::System.Net.Http.HttpMethod("PATCH"),
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUpdateBillingSubscriptionProductsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingSubscriptionProducts",
+ methodName: "UpdateBillingSubscriptionProductsAsync",
+ pathTemplate: "\"/subscription/products\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingSubscriptionProducts",
+ methodName: "UpdateBillingSubscriptionProductsAsync",
+ pathTemplate: "\"/subscription/products\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingSubscriptionProducts",
+ methodName: "UpdateBillingSubscriptionProductsAsync",
+ pathTemplate: "\"/subscription/products\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateBillingSubscriptionProductsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingSubscriptionProducts",
+ methodName: "UpdateBillingSubscriptionProductsAsync",
+ pathTemplate: "\"/subscription/products\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingSubscriptionProducts",
+ methodName: "UpdateBillingSubscriptionProductsAsync",
+ pathTemplate: "\"/subscription/products\"",
+ httpMethod: "PATCH",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request could not be parsed or contains invalid parameters.
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::ResembleAI.BillingError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // Additional customer authentication is required before the billing change can complete.
+ if ((int)__response.StatusCode == 402)
+ {
+ string? __content_402 = null;
+ global::System.Exception? __exception_402 = null;
+ global::ResembleAI.BillingPaymentActionRequired? __value_402 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_402 = global::ResembleAI.BillingPaymentActionRequired.FromJson(__content_402, JsonSerializerContext);
+ }
+ else
+ {
+ __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_402 = global::ResembleAI.BillingPaymentActionRequired.FromJson(__content_402, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_402 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_402 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_402,
+ responseBody: __content_402,
+ responseObject: __value_402,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The requested billing resource does not exist for the current team.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::ResembleAI.BillingError? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::ResembleAI.BillingError.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ responseBody: __content_404,
+ responseObject: __value_404,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The request was understood but violates a billing rule.
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUpdateBillingSubscriptionProductsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingSubscriptionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update subscription product quantities
+ /// Updates one or more adjustable subscription products atomically. Each `new_quantity` is the desired absolute total, not an increment. A product is adjustable when its category is `subscription` and its `plan_product.allow_additional_usage` value is true. Quantities must remain within the plan's minimum and maximum and cannot be reduced below `consumed_quantity`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UpdateBillingSubscriptionProductsAsync(
+ global::System.Collections.Generic.IList changes,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::ResembleAI.BillingUpdateProductsRequest
+ {
+ Changes = changes,
+ };
+
+ return await UpdateBillingSubscriptionProductsAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.g.cs
new file mode 100644
index 0000000..b7385c7
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingSubscriptionsClient.g.cs
@@ -0,0 +1,175 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class BillingSubscriptionsClient : global::ResembleAI.IBillingSubscriptionsClient, global::System.IDisposable
+ {
+ ///
+ ///
+ ///
+ public const string DefaultBaseUrl = "https://app.resemble.ai/api/v2";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => HttpClient.BaseAddress;
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ internal global::ResembleAI.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::ResembleAI.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::ResembleAI.SourceGenerationContext.Default;
+
+
+ ///
+ /// Creates a new instance of the BillingSubscriptionsClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingSubscriptionsClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BillingSubscriptionsClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingSubscriptionsClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::ResembleAI.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BillingSubscriptionsClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingSubscriptionsClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::ResembleAI.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::ResembleAI.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+
+
+ private global::System.Uri? ResolveBaseUri(
+ global::ResembleAI.AutoSDKServer[] servers,
+ string defaultBaseUrl)
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ if (AutoSDKServerConfiguration.SelectedServer is global::ResembleAI.AutoSDKServer selectedServer)
+ {
+ foreach (var server in servers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server.Uri;
+ }
+ }
+ }
+
+ if (servers.Length > 0)
+ {
+ return servers[0].Uri;
+ }
+
+ return string.IsNullOrWhiteSpace(defaultBaseUrl)
+ ? HttpClient.BaseAddress
+ : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.ExportBillingWalletTransactions.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.ExportBillingWalletTransactions.g.cs
new file mode 100644
index 0000000..bd41401
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.ExportBillingWalletTransactions.g.cs
@@ -0,0 +1,534 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingWalletClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_ExportBillingWalletTransactionsServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_ExportBillingWalletTransactionsSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_ExportBillingWalletTransactionsSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_ExportBillingWalletTransactionsSecurityRequirement0,
+ };
+ partial void PrepareExportBillingWalletTransactionsArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareExportBillingWalletTransactionsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessExportBillingWalletTransactionsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessExportBillingWalletTransactionsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Export wallet transactions
+ /// Downloads the current team's complete wallet transaction history as a CSV file, newest first.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ExportBillingWalletTransactionsAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ExportBillingWalletTransactionsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Export wallet transactions
+ /// Downloads the current team's complete wallet transaction history as a CSV file, newest first.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ExportBillingWalletTransactionsAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareExportBillingWalletTransactionsArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ExportBillingWalletTransactionsSecurityRequirements,
+ operationName: "ExportBillingWalletTransactionsAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/wallet/transactions/export.csv",
+ baseUri: ResolveBaseUri(
+ servers: s_ExportBillingWalletTransactionsServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareExportBillingWalletTransactionsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ExportBillingWalletTransactions",
+ methodName: "ExportBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions/export.csv\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ExportBillingWalletTransactions",
+ methodName: "ExportBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions/export.csv\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ExportBillingWalletTransactions",
+ methodName: "ExportBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions/export.csv\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessExportBillingWalletTransactionsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ExportBillingWalletTransactions",
+ methodName: "ExportBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions/export.csv\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ExportBillingWalletTransactions",
+ methodName: "ExportBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions/export.csv\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessExportBillingWalletTransactionsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __content);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.GetBillingAutoReload.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.GetBillingAutoReload.g.cs
new file mode 100644
index 0000000..ea1fb76
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.GetBillingAutoReload.g.cs
@@ -0,0 +1,538 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingWalletClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_GetBillingAutoReloadServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_GetBillingAutoReloadSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_GetBillingAutoReloadSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_GetBillingAutoReloadSecurityRequirement0,
+ };
+ partial void PrepareGetBillingAutoReloadArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareGetBillingAutoReloadRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessGetBillingAutoReloadResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetBillingAutoReloadResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get auto-reload settings
+ /// Returns the current team's auto-reload configuration, whether a payment method is available, and the supported reload range.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetBillingAutoReloadAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetBillingAutoReloadAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get auto-reload settings
+ /// Returns the current team's auto-reload configuration, whether a payment method is available, and the supported reload range.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetBillingAutoReloadAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetBillingAutoReloadArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetBillingAutoReloadSecurityRequirements,
+ operationName: "GetBillingAutoReloadAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/wallet/auto_reload",
+ baseUri: ResolveBaseUri(
+ servers: s_GetBillingAutoReloadServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetBillingAutoReloadRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingAutoReload",
+ methodName: "GetBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingAutoReload",
+ methodName: "GetBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingAutoReload",
+ methodName: "GetBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetBillingAutoReloadResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingAutoReload",
+ methodName: "GetBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingAutoReload",
+ methodName: "GetBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetBillingAutoReloadResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingAutoReloadResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingAutoReloadResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.GetBillingWallet.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.GetBillingWallet.g.cs
new file mode 100644
index 0000000..adb6539
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.GetBillingWallet.g.cs
@@ -0,0 +1,538 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingWalletClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_GetBillingWalletServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_GetBillingWalletSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_GetBillingWalletSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_GetBillingWalletSecurityRequirement0,
+ };
+ partial void PrepareGetBillingWalletArguments(
+ global::System.Net.Http.HttpClient httpClient);
+ partial void PrepareGetBillingWalletRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage);
+ partial void ProcessGetBillingWalletResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetBillingWalletResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get the billing wallet
+ /// Returns the current team's cash, promotional, total, and lifetime wallet balances.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetBillingWalletAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetBillingWalletAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get the billing wallet
+ /// Returns the current team's cash, promotional, total, and lifetime wallet balances.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetBillingWalletAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetBillingWalletArguments(
+ httpClient: HttpClient);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetBillingWalletSecurityRequirements,
+ operationName: "GetBillingWalletAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/wallet",
+ baseUri: ResolveBaseUri(
+ servers: s_GetBillingWalletServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetBillingWalletRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingWallet",
+ methodName: "GetBillingWalletAsync",
+ pathTemplate: "\"/wallet\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingWallet",
+ methodName: "GetBillingWalletAsync",
+ pathTemplate: "\"/wallet\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingWallet",
+ methodName: "GetBillingWalletAsync",
+ pathTemplate: "\"/wallet\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetBillingWalletResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingWallet",
+ methodName: "GetBillingWalletAsync",
+ pathTemplate: "\"/wallet\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetBillingWallet",
+ methodName: "GetBillingWalletAsync",
+ pathTemplate: "\"/wallet\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetBillingWalletResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingWalletResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingWalletResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.ListBillingWalletTransactions.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.ListBillingWalletTransactions.g.cs
new file mode 100644
index 0000000..6639d76
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.ListBillingWalletTransactions.g.cs
@@ -0,0 +1,615 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingWalletClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_ListBillingWalletTransactionsServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_ListBillingWalletTransactionsSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_ListBillingWalletTransactionsSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_ListBillingWalletTransactionsSecurityRequirement0,
+ };
+ partial void PrepareListBillingWalletTransactionsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? limit,
+ ref int? page,
+ ref int? perPage);
+ partial void PrepareListBillingWalletTransactionsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? limit,
+ int? page,
+ int? perPage);
+ partial void ProcessListBillingWalletTransactionsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListBillingWalletTransactionsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List wallet transactions
+ /// Returns wallet transactions newest first. Use page and per_page for paginated results, or limit for an unpaginated recent subset.
+ ///
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ListBillingWalletTransactionsAsync(
+ int? limit = default,
+ int? page = default,
+ int? perPage = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListBillingWalletTransactionsAsResponseAsync(
+ limit: limit,
+ page: page,
+ perPage: perPage,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List wallet transactions
+ /// Returns wallet transactions newest first. Use page and per_page for paginated results, or limit for an unpaginated recent subset.
+ ///
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListBillingWalletTransactionsAsResponseAsync(
+ int? limit = default,
+ int? page = default,
+ int? perPage = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListBillingWalletTransactionsArguments(
+ httpClient: HttpClient,
+ limit: ref limit,
+ page: ref page,
+ perPage: ref perPage);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListBillingWalletTransactionsSecurityRequirements,
+ operationName: "ListBillingWalletTransactionsAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/wallet/transactions",
+ baseUri: ResolveBaseUri(
+ servers: s_ListBillingWalletTransactionsServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ __pathBuilder
+ .AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("page", page?.ToString())
+ .AddOptionalParameter("per_page", perPage?.ToString())
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListBillingWalletTransactionsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ limit: limit,
+ page: page,
+ perPage: perPage);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBillingWalletTransactions",
+ methodName: "ListBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBillingWalletTransactions",
+ methodName: "ListBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBillingWalletTransactions",
+ methodName: "ListBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListBillingWalletTransactionsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBillingWalletTransactions",
+ methodName: "ListBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListBillingWalletTransactions",
+ methodName: "ListBillingWalletTransactionsAsync",
+ pathTemplate: "\"/wallet/transactions\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request could not be parsed or contains invalid parameters.
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::ResembleAI.BillingError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListBillingWalletTransactionsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingTransactionsResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingTransactionsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.UpdateBillingAutoReload.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.UpdateBillingAutoReload.g.cs
new file mode 100644
index 0000000..9e80f67
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.UpdateBillingAutoReload.g.cs
@@ -0,0 +1,664 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial class BillingWalletClient
+ {
+
+ private static readonly global::ResembleAI.AutoSDKServer[] s_UpdateBillingAutoReloadServers = new global::ResembleAI.AutoSDKServer[]
+ { new global::ResembleAI.AutoSDKServer(
+ id: "https-app-resemble-ai-api-v2",
+ name: "app.resemble.ai api v2",
+ url: "https://app.resemble.ai/api/v2",
+ description: ""),
+ };
+
+
+ private static readonly global::ResembleAI.EndPointSecurityRequirement s_UpdateBillingAutoReloadSecurityRequirement0 =
+ new global::ResembleAI.EndPointSecurityRequirement
+ {
+ Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[]
+ { new global::ResembleAI.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_UpdateBillingAutoReloadSecurityRequirements =
+ new global::ResembleAI.EndPointSecurityRequirement[]
+ { s_UpdateBillingAutoReloadSecurityRequirement0,
+ };
+ partial void PrepareUpdateBillingAutoReloadArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::ResembleAI.BillingUpdateAutoReloadRequest request);
+ partial void PrepareUpdateBillingAutoReloadRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::ResembleAI.BillingUpdateAutoReloadRequest request);
+ partial void ProcessUpdateBillingAutoReloadResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUpdateBillingAutoReloadResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Update auto-reload settings
+ /// Enables, disables, or changes wallet auto-reload. Amounts are expressed in cents and must comply with the limits returned by the GET operation.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UpdateBillingAutoReloadAsync(
+
+ global::ResembleAI.BillingUpdateAutoReloadRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateBillingAutoReloadAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update auto-reload settings
+ /// Enables, disables, or changes wallet auto-reload. Amounts are expressed in cents and must comply with the limits returned by the GET operation.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateBillingAutoReloadAsResponseAsync(
+
+ global::ResembleAI.BillingUpdateAutoReloadRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUpdateBillingAutoReloadArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UpdateBillingAutoReloadSecurityRequirements,
+ operationName: "UpdateBillingAutoReloadAsync");
+
+ using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::ResembleAI.PathBuilder(
+ path: "/wallet/auto_reload",
+ baseUri: ResolveBaseUri(
+ servers: s_UpdateBillingAutoReloadServers,
+ defaultBaseUrl: "https://app.resemble.ai/api/v2"));
+ var __path = __pathBuilder.ToString();
+ __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Put,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUpdateBillingAutoReloadRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingAutoReload",
+ methodName: "UpdateBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingAutoReload",
+ methodName: "UpdateBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingAutoReload",
+ methodName: "UpdateBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUpdateBillingAutoReloadResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingAutoReload",
+ methodName: "UpdateBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UpdateBillingAutoReload",
+ methodName: "UpdateBillingAutoReloadAsync",
+ pathTemplate: "\"/wallet/auto_reload\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // The request could not be parsed or contains invalid parameters.
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::ResembleAI.BillingError? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::ResembleAI.BillingError.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // A valid API key was not provided.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::ResembleAI.BillingError? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::ResembleAI.BillingError.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ responseBody: __content_401,
+ responseObject: __value_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The API key owner cannot manage billing, or the Billing API is unavailable for the customer's billing arrangement.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::ResembleAI.BillingForbiddenError? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::ResembleAI.BillingForbiddenError.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ responseBody: __content_403,
+ responseObject: __value_403,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // The request was understood but violates a billing rule.
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::System.Exception? __exception_422 = null;
+ global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError? __value_422 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_422 = global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_422 = global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError.FromJson(__content_422, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_422 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_422 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_422,
+ responseBody: __content_422,
+ responseObject: __value_422,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ // An unexpected billing error occurred.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::ResembleAI.BillingError? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::ResembleAI.BillingError.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ responseBody: __content_500,
+ responseObject: __value_500,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUpdateBillingAutoReloadResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::ResembleAI.BillingWalletUpdateBillingAutoReloadResponse200.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::ResembleAI.BillingWalletUpdateBillingAutoReloadResponse200.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::ResembleAI.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::ResembleAI.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Update auto-reload settings
+ /// Enables, disables, or changes wallet auto-reload. Amounts are expressed in cents and must comply with the limits returned by the GET operation.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UpdateBillingAutoReloadAsync(
+ bool enabled,
+ int reloadAmountCents,
+ int minimumBalanceThresholdCents,
+ int maximumMonthlySpendCents,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::ResembleAI.BillingUpdateAutoReloadRequest
+ {
+ Enabled = enabled,
+ ReloadAmountCents = reloadAmountCents,
+ MinimumBalanceThresholdCents = minimumBalanceThresholdCents,
+ MaximumMonthlySpendCents = maximumMonthlySpendCents,
+ };
+
+ return await UpdateBillingAutoReloadAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.g.cs
new file mode 100644
index 0000000..150a009
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.BillingWalletClient.g.cs
@@ -0,0 +1,175 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class BillingWalletClient : global::ResembleAI.IBillingWalletClient, global::System.IDisposable
+ {
+ ///
+ ///
+ ///
+ public const string DefaultBaseUrl = "https://app.resemble.ai/api/v2";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => HttpClient.BaseAddress;
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ internal global::ResembleAI.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::ResembleAI.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::ResembleAI.SourceGenerationContext.Default;
+
+
+ ///
+ /// Creates a new instance of the BillingWalletClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingWalletClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BillingWalletClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingWalletClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::ResembleAI.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the BillingWalletClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public BillingWalletClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::ResembleAI.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::ResembleAI.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+
+
+ private global::System.Uri? ResolveBaseUri(
+ global::ResembleAI.AutoSDKServer[] servers,
+ string defaultBaseUrl)
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ if (AutoSDKServerConfiguration.SelectedServer is global::ResembleAI.AutoSDKServer selectedServer)
+ {
+ foreach (var server in servers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server.Uri;
+ }
+ }
+ }
+
+ if (servers.Length > 0)
+ {
+ return servers[0].Uri;
+ }
+
+ return string.IsNullOrWhiteSpace(defaultBaseUrl)
+ ? HttpClient.BaseAddress
+ : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.GetBillingPlan.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.GetBillingPlan.g.cs
new file mode 100644
index 0000000..3360f5e
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.GetBillingPlan.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingPlansClient
+ {
+ ///
+ /// Get a billing plan
+ /// Returns an active billing plan by slug, including its products, prices, and quantity rules. This endpoint is public.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetBillingPlanAsync(
+ string id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get a billing plan
+ /// Returns an active billing plan by slug, including its products, prices, and quantity rules. This endpoint is public.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetBillingPlanAsResponseAsync(
+ string id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.ListBillingPlans.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.ListBillingPlans.g.cs
new file mode 100644
index 0000000..938feab
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.ListBillingPlans.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingPlansClient
+ {
+ ///
+ /// List billing plans
+ /// Returns all active self-serve plans, their products, prices, and plan-specific quantity rules. This endpoint is public.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListBillingPlansAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List billing plans
+ /// Returns all active self-serve plans, their products, prices, and plan-specific quantity rules. This endpoint is public.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListBillingPlansAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.g.cs
new file mode 100644
index 0000000..b0b8b76
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingPlansClient.g.cs
@@ -0,0 +1,48 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IBillingPlansClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.ChangeBillingPlan.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.ChangeBillingPlan.g.cs
new file mode 100644
index 0000000..43fc894
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.ChangeBillingPlan.g.cs
@@ -0,0 +1,50 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingSubscriptionsClient
+ {
+ ///
+ /// Change the current subscription plan
+ /// Changes a self-serve subscription to another active plan with proration. Optional product quantities are absolute quantities on the destination plan.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ChangeBillingPlanAsync(
+
+ global::ResembleAI.BillingChangePlanRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Change the current subscription plan
+ /// Changes a self-serve subscription to another active plan with proration. Optional product quantities are absolute quantities on the destination plan.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ChangeBillingPlanAsResponseAsync(
+
+ global::ResembleAI.BillingChangePlanRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Change the current subscription plan
+ /// Changes a self-serve subscription to another active plan with proration. Optional product quantities are absolute quantities on the destination plan.
+ ///
+ ///
+ ///
+ /// Optional map of product slugs to desired quantities on the new plan.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ChangeBillingPlanAsync(
+ string planSlug,
+ global::System.Collections.Generic.Dictionary? productQuantities = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.ConfirmBillingSubscriptionPayment.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.ConfirmBillingSubscriptionPayment.g.cs
new file mode 100644
index 0000000..7c055e7
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.ConfirmBillingSubscriptionPayment.g.cs
@@ -0,0 +1,48 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingSubscriptionsClient
+ {
+ ///
+ /// Confirm a subscription payment
+ /// Synchronizes the subscription after the customer completes the additional payment authentication requested by a quantity or plan change.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ConfirmBillingSubscriptionPaymentAsync(
+
+ global::ResembleAI.BillingConfirmPaymentRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Confirm a subscription payment
+ /// Synchronizes the subscription after the customer completes the additional payment authentication requested by a quantity or plan change.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ConfirmBillingSubscriptionPaymentAsResponseAsync(
+
+ global::ResembleAI.BillingConfirmPaymentRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Confirm a subscription payment
+ /// Synchronizes the subscription after the customer completes the additional payment authentication requested by a quantity or plan change.
+ ///
+ ///
+ /// Payment intent identifier completed by the customer.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ConfirmBillingSubscriptionPaymentAsync(
+ string paymentIntentId,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.GetBillingSubscription.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.GetBillingSubscription.g.cs
new file mode 100644
index 0000000..465ccce
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.GetBillingSubscription.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingSubscriptionsClient
+ {
+ ///
+ /// Get the current subscription
+ /// Returns the current team's active, past-due, or delinquent subscription. Returns a null subscription when no customer-visible subscription exists.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetBillingSubscriptionAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get the current subscription
+ /// Returns the current team's active, past-due, or delinquent subscription. Returns a null subscription when no customer-visible subscription exists.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetBillingSubscriptionAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.UpdateBillingSubscriptionProducts.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.UpdateBillingSubscriptionProducts.g.cs
new file mode 100644
index 0000000..8c706b1
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.UpdateBillingSubscriptionProducts.g.cs
@@ -0,0 +1,46 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingSubscriptionsClient
+ {
+ ///
+ /// Update subscription product quantities
+ /// Updates one or more adjustable subscription products atomically. Each `new_quantity` is the desired absolute total, not an increment. A product is adjustable when its category is `subscription` and its `plan_product.allow_additional_usage` value is true. Quantities must remain within the plan's minimum and maximum and cannot be reduced below `consumed_quantity`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateBillingSubscriptionProductsAsync(
+
+ global::ResembleAI.BillingUpdateProductsRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update subscription product quantities
+ /// Updates one or more adjustable subscription products atomically. Each `new_quantity` is the desired absolute total, not an increment. A product is adjustable when its category is `subscription` and its `plan_product.allow_additional_usage` value is true. Quantities must remain within the plan's minimum and maximum and cannot be reduced below `consumed_quantity`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> UpdateBillingSubscriptionProductsAsResponseAsync(
+
+ global::ResembleAI.BillingUpdateProductsRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update subscription product quantities
+ /// Updates one or more adjustable subscription products atomically. Each `new_quantity` is the desired absolute total, not an increment. A product is adjustable when its category is `subscription` and its `plan_product.allow_additional_usage` value is true. Quantities must remain within the plan's minimum and maximum and cannot be reduced below `consumed_quantity`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateBillingSubscriptionProductsAsync(
+ global::System.Collections.Generic.IList changes,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.g.cs
new file mode 100644
index 0000000..5e49641
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingSubscriptionsClient.g.cs
@@ -0,0 +1,48 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IBillingSubscriptionsClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IAccountClient.GetBillingUsage.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.ExportBillingWalletTransactions.g.cs
similarity index 69%
rename from src/libs/ResembleAI/Generated/ResembleAI.IAccountClient.GetBillingUsage.g.cs
rename to src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.ExportBillingWalletTransactions.g.cs
index 1817626..a6683c5 100644
--- a/src/libs/ResembleAI/Generated/ResembleAI.IAccountClient.GetBillingUsage.g.cs
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.ExportBillingWalletTransactions.g.cs
@@ -2,26 +2,26 @@
namespace ResembleAI
{
- public partial interface IAccountClient
+ public partial interface IBillingWalletClient
{
///
- /// Get billing usage
- /// Get billing and usage information
+ /// Export wallet transactions
+ /// Downloads the current team's complete wallet transaction history as a CSV file, newest first.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task GetBillingUsageAsync(
+ global::System.Threading.Tasks.Task ExportBillingWalletTransactionsAsync(
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
- /// Get billing usage
- /// Get billing and usage information
+ /// Export wallet transactions
+ /// Downloads the current team's complete wallet transaction history as a CSV file, newest first.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task> GetBillingUsageAsResponseAsync(
+ global::System.Threading.Tasks.Task> ExportBillingWalletTransactionsAsResponseAsync(
global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.GetBillingAutoReload.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.GetBillingAutoReload.g.cs
new file mode 100644
index 0000000..6f3a90c
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.GetBillingAutoReload.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingWalletClient
+ {
+ ///
+ /// Get auto-reload settings
+ /// Returns the current team's auto-reload configuration, whether a payment method is available, and the supported reload range.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetBillingAutoReloadAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get auto-reload settings
+ /// Returns the current team's auto-reload configuration, whether a payment method is available, and the supported reload range.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetBillingAutoReloadAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.GetBillingWallet.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.GetBillingWallet.g.cs
new file mode 100644
index 0000000..efab261
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.GetBillingWallet.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingWalletClient
+ {
+ ///
+ /// Get the billing wallet
+ /// Returns the current team's cash, promotional, total, and lifetime wallet balances.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetBillingWalletAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get the billing wallet
+ /// Returns the current team's cash, promotional, total, and lifetime wallet balances.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetBillingWalletAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.ListBillingWalletTransactions.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.ListBillingWalletTransactions.g.cs
new file mode 100644
index 0000000..f5f0ad6
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.ListBillingWalletTransactions.g.cs
@@ -0,0 +1,48 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingWalletClient
+ {
+ ///
+ /// List wallet transactions
+ /// Returns wallet transactions newest first. Use page and per_page for paginated results, or limit for an unpaginated recent subset.
+ ///
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListBillingWalletTransactionsAsync(
+ int? limit = default,
+ int? page = default,
+ int? perPage = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List wallet transactions
+ /// Returns wallet transactions newest first. Use page and per_page for paginated results, or limit for an unpaginated recent subset.
+ ///
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListBillingWalletTransactionsAsResponseAsync(
+ int? limit = default,
+ int? page = default,
+ int? perPage = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.UpdateBillingAutoReload.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.UpdateBillingAutoReload.g.cs
new file mode 100644
index 0000000..686cbc7
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.UpdateBillingAutoReload.g.cs
@@ -0,0 +1,52 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface IBillingWalletClient
+ {
+ ///
+ /// Update auto-reload settings
+ /// Enables, disables, or changes wallet auto-reload. Amounts are expressed in cents and must comply with the limits returned by the GET operation.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateBillingAutoReloadAsync(
+
+ global::ResembleAI.BillingUpdateAutoReloadRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update auto-reload settings
+ /// Enables, disables, or changes wallet auto-reload. Amounts are expressed in cents and must comply with the limits returned by the GET operation.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> UpdateBillingAutoReloadAsResponseAsync(
+
+ global::ResembleAI.BillingUpdateAutoReloadRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update auto-reload settings
+ /// Enables, disables, or changes wallet auto-reload. Amounts are expressed in cents and must comply with the limits returned by the GET operation.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateBillingAutoReloadAsync(
+ bool enabled,
+ int reloadAmountCents,
+ int minimumBalanceThresholdCents,
+ int maximumMonthlySpendCents,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.g.cs
new file mode 100644
index 0000000..9612d35
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IBillingWalletClient.g.cs
@@ -0,0 +1,48 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IBillingWalletClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs
index 9b2cd1a..e462e73 100644
--- a/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs
+++ b/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs
@@ -80,6 +80,21 @@ public partial interface IResembleAIClient : global::System.IDisposable
///
public AudioSourceTracingClient AudioSourceTracing { get; }
+ ///
+ ///
+ ///
+ public BillingPlansClient BillingPlans { get; }
+
+ ///
+ ///
+ ///
+ public BillingSubscriptionsClient BillingSubscriptions { get; }
+
+ ///
+ ///
+ ///
+ public BillingWalletClient BillingWallet { get; }
+
///
///
///
@@ -135,6 +150,11 @@ public partial interface IResembleAIClient : global::System.IDisposable
///
public SecureUploadsClient SecureUploads { get; }
+ ///
+ ///
+ ///
+ public SignalClient Signal { get; }
+
///
///
///
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.CreateSignalCustomCategory.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.CreateSignalCustomCategory.g.cs
new file mode 100644
index 0000000..b29bd73
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.CreateSignalCustomCategory.g.cs
@@ -0,0 +1,68 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Create custom category
+ /// Create a custom fraud category from example phrases. Categories embed asynchronously:
+ /// a new category starts at `pending`, moves to `embedding`, and becomes usable for
+ /// scoring once its status is `ready`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateSignalCustomCategoryAsync(
+
+ global::ResembleAI.SignalCustomCategoryCreateRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create custom category
+ /// Create a custom fraud category from example phrases. Categories embed asynchronously:
+ /// a new category starts at `pending`, moves to `embedding`, and becomes usable for
+ /// scoring once its status is `ready`.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateSignalCustomCategoryAsResponseAsync(
+
+ global::ResembleAI.SignalCustomCategoryCreateRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create custom category
+ /// Create a custom fraud category from example phrases. Categories embed asynchronously:
+ /// a new category starts at `pending`, moves to `embedding`, and becomes usable for
+ /// scoring once its status is `ready`.
+ ///
+ ///
+ /// Category name. Must be unique within the team.
+ ///
+ ///
+ /// Example phrases that define the pattern. Maximum 50 entries, each up to 2000 characters. A newline-separated string is also accepted.
+ ///
+ ///
+ ///
+ /// Single emoji.
+ ///
+ ///
+ /// Default Value: true
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateSignalCustomCategoryAsync(
+ string name,
+ global::System.Collections.Generic.IList scenarios,
+ string? description = default,
+ string? icon = default,
+ bool? enabled = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.CreateSignalSubmission.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.CreateSignalSubmission.g.cs
new file mode 100644
index 0000000..5f9bd48
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.CreateSignalSubmission.g.cs
@@ -0,0 +1,66 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Score content
+ /// Score a piece of content against the fraud and scam categories available to your team
+ /// and return a verdict with the best-matching categories.
+ /// Supply exactly one of:
+ /// - **Text** — `application/json` with a `text` field.
+ /// - **File** — `multipart/form-data` with the media attached as `file`. Audio, image, and
+ /// video are supported, up to 15 MB. The media type is detected from the file's MIME type
+ /// unless `media_type` is supplied.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateSignalSubmissionAsync(
+
+ global::ResembleAI.CreateSignalSubmissionRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Score content
+ /// Score a piece of content against the fraud and scam categories available to your team
+ /// and return a verdict with the best-matching categories.
+ /// Supply exactly one of:
+ /// - **Text** — `application/json` with a `text` field.
+ /// - **File** — `multipart/form-data` with the media attached as `file`. Audio, image, and
+ /// video are supported, up to 15 MB. The media type is detected from the file's MIME type
+ /// unless `media_type` is supplied.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateSignalSubmissionAsResponseAsync(
+
+ global::ResembleAI.CreateSignalSubmissionRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Score content
+ /// Score a piece of content against the fraud and scam categories available to your team
+ /// and return a verdict with the best-matching categories.
+ /// Supply exactly one of:
+ /// - **Text** — `application/json` with a `text` field.
+ /// - **File** — `multipart/form-data` with the media attached as `file`. Audio, image, and
+ /// video are supported, up to 15 MB. The media type is detected from the file's MIME type
+ /// unless `media_type` is supplied.
+ ///
+ ///
+ /// Text to analyze.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CreateSignalSubmissionAsync(
+ string text,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.DeleteSignalCustomCategory.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.DeleteSignalCustomCategory.g.cs
new file mode 100644
index 0000000..cd54e78
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.DeleteSignalCustomCategory.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Delete custom category
+ /// Delete a custom category and its example phrases.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteSignalCustomCategoryAsync(
+ int id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete custom category
+ /// Delete a custom category and its example phrases.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> DeleteSignalCustomCategoryAsResponseAsync(
+ int id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.DeleteSignalSubmission.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.DeleteSignalSubmission.g.cs
new file mode 100644
index 0000000..ce40033
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.DeleteSignalSubmission.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Delete submission
+ /// Permanently delete a Signal submission belonging to your team.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteSignalSubmissionAsync(
+ int id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete submission
+ /// Permanently delete a Signal submission belonging to your team.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> DeleteSignalSubmissionAsResponseAsync(
+ int id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.GetSignalCustomCategory.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.GetSignalCustomCategory.g.cs
new file mode 100644
index 0000000..195965b
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.GetSignalCustomCategory.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Get custom category
+ /// Retrieve a single custom category with its example phrases.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSignalCustomCategoryAsync(
+ int id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get custom category
+ /// Retrieve a single custom category with its example phrases.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSignalCustomCategoryAsResponseAsync(
+ int id,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.ListSignalCustomCategories.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.ListSignalCustomCategories.g.cs
new file mode 100644
index 0000000..e8df4b6
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.ListSignalCustomCategories.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// List custom categories
+ /// Retrieve the team's Signal settings, the built-in categories, the team's custom categories with their example phrases, and calibration status.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListSignalCustomCategoriesAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List custom categories
+ /// Retrieve the team's Signal settings, the built-in categories, the team's custom categories with their example phrases, and calibration status.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListSignalCustomCategoriesAsResponseAsync(
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.ListSignalSubmissions.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.ListSignalSubmissions.g.cs
new file mode 100644
index 0000000..2d45552
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.ListSignalSubmissions.g.cs
@@ -0,0 +1,44 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// List submissions
+ /// Retrieve past Signal submissions for your team, newest first.
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListSignalSubmissionsAsync(
+ int? page = default,
+ int? perPage = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List submissions
+ /// Retrieve past Signal submissions for your team, newest first.
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListSignalSubmissionsAsResponseAsync(
+ int? page = default,
+ int? perPage = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.UpdateSignalCustomCategory.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.UpdateSignalCustomCategory.g.cs
new file mode 100644
index 0000000..a51a87a
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.UpdateSignalCustomCategory.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Update custom category
+ /// Update a custom category. Supplying `scenarios` replaces the existing example phrases and re-triggers embedding.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateSignalCustomCategoryAsync(
+ int id,
+
+ global::ResembleAI.SignalCustomCategoryUpdateRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update custom category
+ /// Update a custom category. Supplying `scenarios` replaces the existing example phrases and re-triggers embedding.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> UpdateSignalCustomCategoryAsResponseAsync(
+ int id,
+
+ global::ResembleAI.SignalCustomCategoryUpdateRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update custom category
+ /// Update a custom category. Supplying `scenarios` replaces the existing example phrases and re-triggers embedding.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateSignalCustomCategoryAsync(
+ int id,
+ string? name = default,
+ global::System.Collections.Generic.IList? scenarios = default,
+ string? description = default,
+ string? icon = default,
+ bool? enabled = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.UpdateSignalSettings.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.UpdateSignalSettings.g.cs
new file mode 100644
index 0000000..b7bdd84
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.UpdateSignalSettings.g.cs
@@ -0,0 +1,48 @@
+#nullable enable
+
+namespace ResembleAI
+{
+ public partial interface ISignalClient
+ {
+ ///
+ /// Update team settings
+ /// Update team-level Signal preferences.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateSignalSettingsAsync(
+
+ global::ResembleAI.SignalSettingsUpdateRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update team settings
+ /// Update team-level Signal preferences.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> UpdateSignalSettingsAsResponseAsync(
+
+ global::ResembleAI.SignalSettingsUpdateRequest request,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update team settings
+ /// Update team-level Signal preferences.
+ ///
+ ///
+ /// When false, scoring uses only the team's custom categories.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UpdateSignalSettingsAsync(
+ bool? useBuiltinCategories = default,
+ global::ResembleAI.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.g.cs
new file mode 100644
index 0000000..44debe5
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.ISignalClient.g.cs
@@ -0,0 +1,48 @@
+
+#nullable enable
+
+namespace ResembleAI
+{
+ ///
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface ISignalClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::ResembleAI.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanBillingInterval.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanBillingInterval.g.cs
new file mode 100644
index 0000000..0bbb108
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanBillingInterval.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingPlanBillingIntervalJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingPlanBillingInterval Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingPlanBillingIntervalExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingPlanBillingInterval)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingPlanBillingInterval);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingPlanBillingInterval value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.BillingPlanBillingIntervalExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanBillingIntervalNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanBillingIntervalNullable.g.cs
new file mode 100644
index 0000000..d998aca
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanBillingIntervalNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingPlanBillingIntervalNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingPlanBillingInterval? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingPlanBillingIntervalExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingPlanBillingInterval)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingPlanBillingInterval?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingPlanBillingInterval? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.BillingPlanBillingIntervalExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanPlanType.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanPlanType.g.cs
new file mode 100644
index 0000000..2a322e9
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanPlanType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingPlanPlanTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingPlanPlanType Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingPlanPlanTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingPlanPlanType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingPlanPlanType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingPlanPlanType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.BillingPlanPlanTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanPlanTypeNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanPlanTypeNullable.g.cs
new file mode 100644
index 0000000..6e952c1
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanPlanTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingPlanPlanTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingPlanPlanType? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingPlanPlanTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingPlanPlanType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingPlanPlanType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingPlanPlanType? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.BillingPlanPlanTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanProductCategory.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanProductCategory.g.cs
new file mode 100644
index 0000000..d3060de
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanProductCategory.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingPlanProductCategoryJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingPlanProductCategory Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingPlanProductCategoryExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingPlanProductCategory)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingPlanProductCategory);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingPlanProductCategory value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.BillingPlanProductCategoryExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanProductCategoryNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanProductCategoryNullable.g.cs
new file mode 100644
index 0000000..f61cf94
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingPlanProductCategoryNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingPlanProductCategoryNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingPlanProductCategory? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingPlanProductCategoryExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingPlanProductCategory)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingPlanProductCategory?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingPlanProductCategory? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.BillingPlanProductCategoryExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionProductCategory.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionProductCategory.g.cs
new file mode 100644
index 0000000..f851261
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionProductCategory.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingSubscriptionProductCategoryJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingSubscriptionProductCategory Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingSubscriptionProductCategoryExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingSubscriptionProductCategory)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingSubscriptionProductCategory);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingSubscriptionProductCategory value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.BillingSubscriptionProductCategoryExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionProductCategoryNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionProductCategoryNullable.g.cs
new file mode 100644
index 0000000..b5fede0
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionProductCategoryNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingSubscriptionProductCategoryNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingSubscriptionProductCategory? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingSubscriptionProductCategoryExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingSubscriptionProductCategory)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingSubscriptionProductCategory?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingSubscriptionProductCategory? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.BillingSubscriptionProductCategoryExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionStatus.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionStatus.g.cs
new file mode 100644
index 0000000..7e45f5f
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingSubscriptionStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingSubscriptionStatus Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingSubscriptionStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingSubscriptionStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingSubscriptionStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingSubscriptionStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.BillingSubscriptionStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionStatusNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionStatusNullable.g.cs
new file mode 100644
index 0000000..6636756
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingSubscriptionStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingSubscriptionStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingSubscriptionStatus? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingSubscriptionStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingSubscriptionStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingSubscriptionStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingSubscriptionStatus? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.BillingSubscriptionStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingWalletTransactionTransactionType.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingWalletTransactionTransactionType.g.cs
new file mode 100644
index 0000000..cb91a56
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingWalletTransactionTransactionType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingWalletTransactionTransactionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingWalletTransactionTransactionType Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingWalletTransactionTransactionTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingWalletTransactionTransactionType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingWalletTransactionTransactionType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingWalletTransactionTransactionType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.BillingWalletTransactionTransactionTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingWalletTransactionTransactionTypeNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingWalletTransactionTransactionTypeNullable.g.cs
new file mode 100644
index 0000000..32884bb
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.BillingWalletTransactionTransactionTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class BillingWalletTransactionTransactionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.BillingWalletTransactionTransactionType? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.BillingWalletTransactionTransactionTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.BillingWalletTransactionTransactionType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.BillingWalletTransactionTransactionType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.BillingWalletTransactionTransactionType? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.BillingWalletTransactionTransactionTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.ChangeBillingPlanRequestUnprocessableEntityError.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.ChangeBillingPlanRequestUnprocessableEntityError.g.cs
new file mode 100644
index 0000000..c4aa2b7
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.ChangeBillingPlanRequestUnprocessableEntityError.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public class ChangeBillingPlanRequestUnprocessableEntityErrorJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
+ var __rawJson = __jsonDocument.RootElement.GetRawText();
+ var __jsonProps = new global::System.Collections.Generic.HashSet();
+ if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name);
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("error")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("errors")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::ResembleAI.BillingError? billingError = default;
+ global::ResembleAI.BillingValidationErrors? billingValidationErrors = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError(
+ billingError,
+
+ billingValidationErrors
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ if (value.IsBillingError)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingError!, typeInfo);
+ }
+ else if (value.IsBillingValidationErrors)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingValidationErrors!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError.g.cs
new file mode 100644
index 0000000..caf70e5
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public class ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityErrorJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
+ var __rawJson = __jsonDocument.RootElement.GetRawText();
+ var __jsonProps = new global::System.Collections.Generic.HashSet();
+ if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name);
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("error")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("errors")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::ResembleAI.BillingError? billingError = default;
+ global::ResembleAI.BillingValidationErrors? billingValidationErrors = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError(
+ billingError,
+
+ billingValidationErrors
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ if (value.IsBillingError)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingError!, typeInfo);
+ }
+ else if (value.IsBillingValidationErrors)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingValidationErrors!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalCustomCategoryStatus.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalCustomCategoryStatus.g.cs
new file mode 100644
index 0000000..06f8241
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalCustomCategoryStatus.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalCustomCategoryStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalCustomCategoryStatus Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalCustomCategoryStatusExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalCustomCategoryStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalCustomCategoryStatus);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalCustomCategoryStatus value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.SignalCustomCategoryStatusExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalCustomCategoryStatusNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalCustomCategoryStatusNullable.g.cs
new file mode 100644
index 0000000..90cfb75
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalCustomCategoryStatusNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalCustomCategoryStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalCustomCategoryStatus? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalCustomCategoryStatusExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalCustomCategoryStatus)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalCustomCategoryStatus?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalCustomCategoryStatus? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.SignalCustomCategoryStatusExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemInputModality.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemInputModality.g.cs
new file mode 100644
index 0000000..743aefb
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemInputModality.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalScoreItemInputModalityJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalScoreItemInputModality Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalScoreItemInputModalityExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalScoreItemInputModality)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalScoreItemInputModality);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalScoreItemInputModality value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.SignalScoreItemInputModalityExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemInputModalityNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemInputModalityNullable.g.cs
new file mode 100644
index 0000000..3637183
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemInputModalityNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalScoreItemInputModalityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalScoreItemInputModality? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalScoreItemInputModalityExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalScoreItemInputModality)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalScoreItemInputModality?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalScoreItemInputModality? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.SignalScoreItemInputModalityExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemVerdict.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemVerdict.g.cs
new file mode 100644
index 0000000..4f1f39c
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemVerdict.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalScoreItemVerdictJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalScoreItemVerdict Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalScoreItemVerdictExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalScoreItemVerdict)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalScoreItemVerdict);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalScoreItemVerdict value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.SignalScoreItemVerdictExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemVerdictNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemVerdictNullable.g.cs
new file mode 100644
index 0000000..6804451
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalScoreItemVerdictNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalScoreItemVerdictNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalScoreItemVerdict? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalScoreItemVerdictExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalScoreItemVerdict)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalScoreItemVerdict?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalScoreItemVerdict? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.SignalScoreItemVerdictExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionInputModality.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionInputModality.g.cs
new file mode 100644
index 0000000..fe49aad
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionInputModality.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalSubmissionInputModalityJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalSubmissionInputModality Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalSubmissionInputModalityExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalSubmissionInputModality)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalSubmissionInputModality);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalSubmissionInputModality value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.SignalSubmissionInputModalityExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionInputModalityNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionInputModalityNullable.g.cs
new file mode 100644
index 0000000..2cf9993
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionInputModalityNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalSubmissionInputModalityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalSubmissionInputModality? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalSubmissionInputModalityExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalSubmissionInputModality)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalSubmissionInputModality?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalSubmissionInputModality? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.SignalSubmissionInputModalityExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionVerdict.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionVerdict.g.cs
new file mode 100644
index 0000000..d5ca476
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionVerdict.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalSubmissionVerdictJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalSubmissionVerdict Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalSubmissionVerdictExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalSubmissionVerdict)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalSubmissionVerdict);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalSubmissionVerdict value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::ResembleAI.SignalSubmissionVerdictExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionVerdictNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionVerdictNullable.g.cs
new file mode 100644
index 0000000..3e086b5
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.SignalSubmissionVerdictNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public sealed class SignalSubmissionVerdictNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.SignalSubmissionVerdict? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::ResembleAI.SignalSubmissionVerdictExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::ResembleAI.SignalSubmissionVerdict)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::ResembleAI.SignalSubmissionVerdict?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.SignalSubmissionVerdict? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::ResembleAI.SignalSubmissionVerdictExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.UpdateBillingAutoReloadRequestUnprocessableEntityError.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.UpdateBillingAutoReloadRequestUnprocessableEntityError.g.cs
new file mode 100644
index 0000000..eb913a3
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.UpdateBillingAutoReloadRequestUnprocessableEntityError.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public class UpdateBillingAutoReloadRequestUnprocessableEntityErrorJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
+ var __rawJson = __jsonDocument.RootElement.GetRawText();
+ var __jsonProps = new global::System.Collections.Generic.HashSet();
+ if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name);
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("error")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("errors")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::ResembleAI.BillingError? billingError = default;
+ global::ResembleAI.BillingValidationErrors? billingValidationErrors = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError(
+ billingError,
+
+ billingValidationErrors
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ if (value.IsBillingError)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingError!, typeInfo);
+ }
+ else if (value.IsBillingValidationErrors)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingValidationErrors!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError.g.cs
new file mode 100644
index 0000000..c6249f5
--- /dev/null
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError.g.cs
@@ -0,0 +1,141 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace ResembleAI.JsonConverters
+{
+ ///
+ public class UpdateBillingSubscriptionProductsRequestUnprocessableEntityErrorJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
+ var __rawJson = __jsonDocument.RootElement.GetRawText();
+ var __jsonProps = new global::System.Collections.Generic.HashSet();
+ if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name);
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("error")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("errors")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::ResembleAI.BillingError? billingError = default;
+ global::ResembleAI.BillingValidationErrors? billingValidationErrors = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ billingError = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ if (billingError == null && billingValidationErrors == null)
+ {
+ try
+ {
+
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ billingValidationErrors = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError(
+ billingError,
+
+ billingValidationErrors
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ if (value.IsBillingError)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingError).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingError!, typeInfo);
+ }
+ else if (value.IsBillingValidationErrors)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ResembleAI.BillingValidationErrors), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ResembleAI.BillingValidationErrors).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.BillingValidationErrors!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs
index 800022f..33e47dd 100644
--- a/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs
+++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs
@@ -241,6 +241,26 @@ namespace ResembleAI
typeof(global::ResembleAI.JsonConverters.WatermarkVisionDetectionMetricsVerdictNullableJsonConverter),
+ typeof(global::ResembleAI.JsonConverters.SignalSubmissionInputModalityJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalSubmissionInputModalityNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalSubmissionVerdictJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalSubmissionVerdictNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalScoreItemInputModalityJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalScoreItemInputModalityNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalScoreItemVerdictJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalScoreItemVerdictNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalCustomCategoryStatusJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.SignalCustomCategoryStatusNullableJsonConverter),
+
typeof(global::ResembleAI.JsonConverters.SynthesizePostRequestBodyContentApplicationJsonSchemaPrecisionJsonConverter),
typeof(global::ResembleAI.JsonConverters.SynthesizePostRequestBodyContentApplicationJsonSchemaPrecisionNullableJsonConverter),
@@ -301,6 +321,30 @@ namespace ResembleAI
typeof(global::ResembleAI.JsonConverters.DuetPostRequestBodyContentApplicationJsonSchemaScriptItemsSpeakerNullableJsonConverter),
+ typeof(global::ResembleAI.JsonConverters.BillingPlanPlanTypeJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingPlanPlanTypeNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingPlanBillingIntervalJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingPlanBillingIntervalNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingPlanProductCategoryJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingPlanProductCategoryNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingSubscriptionStatusJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingSubscriptionStatusNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingSubscriptionProductCategoryJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingSubscriptionProductCategoryNullableJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingWalletTransactionTransactionTypeJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.BillingWalletTransactionTransactionTypeNullableJsonConverter),
+
typeof(global::ResembleAI.JsonConverters.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionJsonConverter),
typeof(global::ResembleAI.JsonConverters.DetectIntelligenceResultDescriptionJsonConverter),
@@ -311,6 +355,14 @@ namespace ResembleAI
typeof(global::ResembleAI.JsonConverters.WatermarkDetectItemMetricsJsonConverter),
+ typeof(global::ResembleAI.JsonConverters.UpdateBillingSubscriptionProductsRequestUnprocessableEntityErrorJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityErrorJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.ChangeBillingPlanRequestUnprocessableEntityErrorJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.UpdateBillingAutoReloadRequestUnprocessableEntityErrorJsonConverter),
+
typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
@@ -329,9 +381,21 @@ namespace ResembleAI
typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
+ typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
+
+ typeof(global::ResembleAI.JsonConverters.OneOfJsonConverter),
+
typeof(global::ResembleAI.JsonConverters.UnixTimestampJsonConverter),
})]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.JsonSerializerContextTypes))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectGetResponsesContentApplicationJsonSchemaItemsItemsMediaType), TypeInfoPropertyName = "DetectGetResponsesContentApplicationJsonSchemaItemsItemsMediaType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectGetResponsesContentApplicationJsonSchemaItemsItemsStatus), TypeInfoPropertyName = "DetectGetResponsesContentApplicationJsonSchemaItemsItemsStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectGetResponsesContentApplicationJsonSchemaItemsItemsModality), TypeInfoPropertyName = "DetectGetResponsesContentApplicationJsonSchemaItemsItemsModality2")]
@@ -524,6 +588,41 @@ namespace ResembleAI
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkDetectItem))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.OneOf), TypeInfoPropertyName = "OneOfWatermarkDetectItemMetricsObject2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkDetectResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionInputModality), TypeInfoPropertyName = "SignalSubmissionInputModality2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionVerdict), TypeInfoPropertyName = "SignalSubmissionVerdict2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCategoryScore))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalScoreItemInputModality), TypeInfoPropertyName = "SignalScoreItemInputModality2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalScoreItemVerdict), TypeInfoPropertyName = "SignalScoreItemVerdict2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalTopMatch))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalScoreItem))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmission))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionListResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalError))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalScoreResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSuccessResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSettings))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalBuiltInCategory))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategoryStatus), TypeInfoPropertyName = "SignalCustomCategoryStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategoryOverlapsItems))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalScenario))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategory))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCalibrationWarningsItems))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCalibration))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategoryListResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategoryCreateRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategoryResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCustomCategoryUpdateRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSettingsUpdateRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSettingsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SecureUploadsCreateSecureUploadResponse200))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaPrecision), TypeInfoPropertyName = "SynthesizePostRequestBodyContentApplicationJsonSchemaPrecision2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaOutputFormat), TypeInfoPropertyName = "SynthesizePostRequestBodyContentApplicationJsonSchemaOutputFormat2")]
@@ -679,6 +778,57 @@ namespace ResembleAI
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.AccountTeamsTeamUuidGetResponsesContentApplicationJsonSchemaItem))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.AccountGetTeamResponse200))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlanPlanType), TypeInfoPropertyName = "BillingPlanPlanType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlanBillingInterval), TypeInfoPropertyName = "BillingPlanBillingInterval2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlanFamily))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlanProductCategory), TypeInfoPropertyName = "BillingPlanProductCategory2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingProductRateTier))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingProductFamily))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlanProduct))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.OneOf), TypeInfoPropertyName = "OneOfBillingProductFamilyObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlan))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.OneOf), TypeInfoPropertyName = "OneOfBillingPlanFamilyObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlansResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingError))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPlanResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscriptionStatus), TypeInfoPropertyName = "BillingSubscriptionStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscriptionProductCategory), TypeInfoPropertyName = "BillingSubscriptionProductCategory2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscriptionProduct))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscriptionPlanProduct))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscriptionItem))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.OneOf), TypeInfoPropertyName = "OneOfBillingSubscriptionPlanProductObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscription))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingSubscriptionResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.OneOf), TypeInfoPropertyName = "OneOfBillingSubscriptionObject2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingForbiddenError))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingProductQuantityChange))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingUpdateProductsRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingPaymentActionRequired))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingValidationErrors))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError), TypeInfoPropertyName = "UpdateBillingSubscriptionProductsRequestUnprocessableEntityError2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingConfirmPaymentRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError), TypeInfoPropertyName = "ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.BillingChangePlanRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary