diff --git a/Directory.Packages.props b/Directory.Packages.props index 0da372c..a188791 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,17 +1,18 @@ <Project> - <PropertyGroup> - <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> - </PropertyGroup> - <ItemGroup> - <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> - <PackageVersion Include="dotenv.net" Version="3.1.3" /> - <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.1" /> - <PackageVersion Include="xunit" Version="2.4.2" /> - <PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" /> - <PackageVersion Include="coverlet.collector" Version="3.2.0" /> - <PackageVersion Include="System.Net.Http" Version="4.3.4" /> - <PackageVersion Include="Nethereum.ABI" Version="4.19.0" /> - <PackageVersion Include="Nethereum.Hex" Version="4.19.0" /> - <PackageVersion Include="Nethereum.Contracts" Version="4.19.0" /> - </ItemGroup> + <PropertyGroup> + <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> + </PropertyGroup> + <ItemGroup> + <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> + <PackageVersion Include="dotenv.net" Version="3.1.3" /> + <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.1" /> + <PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" /> + <PackageVersion Include="xunit" Version="2.4.2" /> + <PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" /> + <PackageVersion Include="coverlet.collector" Version="3.2.0" /> + <PackageVersion Include="System.Net.Http" Version="4.3.4" /> + <PackageVersion Include="Nethereum.ABI" Version="4.19.0" /> + <PackageVersion Include="Nethereum.Hex" Version="4.19.0" /> + <PackageVersion Include="Nethereum.Contracts" Version="4.19.0" /> + </ItemGroup> </Project> \ No newline at end of file diff --git a/Thirdweb.Console/Program.cs b/Thirdweb.Console/Program.cs index d501da1..da6198d 100644 --- a/Thirdweb.Console/Program.cs +++ b/Thirdweb.Console/Program.cs @@ -1,24 +1,40 @@ using dotenv.net; using Newtonsoft.Json; using Thirdweb; +using Thirdweb.Pay; DotEnv.Load(); -var secretKey = Environment.GetEnvironmentVariable("THIRDWEB_SECRET_KEY"); +// var secretKey = Environment.GetEnvironmentVariable("THIRDWEB_SECRET_KEY"); -var clientOptions = new ThirdwebClientOptions(secretKey: secretKey, fetchTimeoutOptions: new TimeoutOptions(storage: 30000, rpc: 10000)); -var client = new ThirdwebClient(clientOptions); +// var clientOptions = new ThirdwebClientOptions(secretKey: secretKey, fetchTimeoutOptions: new TimeoutOptions(storage: 30000, rpc: 10000)); +// var client = new ThirdwebClient(clientOptions); -Console.WriteLine($"Initialized ThirdwebClient: {JsonConvert.SerializeObject(clientOptions, Formatting.Indented)}"); +// Console.WriteLine($"Initialized ThirdwebClient: {JsonConvert.SerializeObject(clientOptions, Formatting.Indented)}"); -var rpc = ThirdwebRPC.GetRpcInstance(client, 1); -var blockNumber = await rpc.SendRequestAsync<string>("eth_blockNumber"); -Console.WriteLine($"Block number: {blockNumber}"); +// var rpc = ThirdwebRPC.GetRpcInstance(client, 1); +// var blockNumber = await rpc.SendRequestAsync<string>("eth_blockNumber"); +// Console.WriteLine($"Block number: {blockNumber}"); -var contractOptions = new ThirdwebContractOptions(client: client, address: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", chain: 1, abi: "function name() view returns (string)"); -var contract = new ThirdwebContract(contractOptions); -var readResult = await ThirdwebContract.ReadContract<string>(contract, "name"); +// var contractOptions = new ThirdwebContractOptions(client: client, address: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", chain: 1, abi: "function name() view returns (string)"); +// var contract = new ThirdwebContract(contractOptions); +// var readResult = await ThirdwebContract.ReadContract<string>(contract, "name"); -Console.WriteLine($"Contract read result: {readResult}"); +// Console.WriteLine($"Contract read result: {readResult}"); -Console.ReadLine(); +// Console.ReadLine(); + +// Thirdweb Pay Test + +var secretKey = Environment.GetEnvironmentVariable("THIRDWEB_PAY_SECRET_KEY"); + +var payClient = new ThirdwebPay(new ThirdwebPayOptions(secretKey: secretKey)); + +var quote = await payClient.GetQuoteAsync( + fromAddress: "0xDaaBDaaC8073A7dAbdC96F6909E8476ab4001B34", + fromChainId: 137, + fromTokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + toTokenAddress: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + toAmount: "1" +); +Console.WriteLine($"Swap quote: {JsonConvert.SerializeObject(quote)}"); diff --git a/Thirdweb.Console/Thirdweb.Console.csproj b/Thirdweb.Console/Thirdweb.Console.csproj index 7d6573c..18f5f8d 100644 --- a/Thirdweb.Console/Thirdweb.Console.csproj +++ b/Thirdweb.Console/Thirdweb.Console.csproj @@ -11,6 +11,7 @@ <ItemGroup> <ProjectReference Include="..\Thirdweb\Thirdweb.csproj" /> + <ProjectReference Include="..\Thirdweb.Pay\Thirdweb.Pay.csproj" /> </ItemGroup> <ItemGroup> diff --git a/Thirdweb.Pay/README.md b/Thirdweb.Pay/README.md new file mode 100644 index 0000000..bbc9115 --- /dev/null +++ b/Thirdweb.Pay/README.md @@ -0,0 +1,5 @@ +# Thirdweb Pay .NET SDK + +## Overview + +The Thirdweb Pay .NET SDK is a powerful library that allows developers to swap, bridge and onramp using various blockchains and payment providers. diff --git a/Thirdweb.Pay/Thirdweb.Pay.csproj b/Thirdweb.Pay/Thirdweb.Pay.csproj new file mode 100644 index 0000000..087fe35 --- /dev/null +++ b/Thirdweb.Pay/Thirdweb.Pay.csproj @@ -0,0 +1,38 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>$(DefaultTargetFrameworks)</TargetFrameworks> + <PackageVersion>$(DefaultVersion)</PackageVersion> + <AssemblyVersion>$(DefaultVersion)</AssemblyVersion> + <FileVersion>$(DefaultVersion)</FileVersion> + <PackageId>Thirdweb.Pay</PackageId> + <Title>Thirdweb Pay</Title> + <Authors>0xfirekeeper</Authors> + <Description>Best in class Web3 .NET Swap/OnRamp SDK, powered by thirdweb.</Description> + <Copyright>Copyright (c) thirdweb 2024</Copyright> + <PackageProjectUrl>https://thirdweb.com/</PackageProjectUrl> + <PackageIcon>icon.png</PackageIcon> + <RepositoryUrl>https://github.com/thirdweb-dev/thirdweb-dotnet</RepositoryUrl> + <RepositoryType>git</RepositoryType> + <PackageTags>thirdweb wallet contracts client web3 ethereum blockchain game unity godot</PackageTags> + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> + <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> + </PropertyGroup> + + <PropertyGroup> + <PackageReadmeFile>README.md</PackageReadmeFile> + <GenerateDocumentationFile>true</GenerateDocumentationFile> + <NoWarn>$(NoWarn);1591</NoWarn> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Newtonsoft.Json" /> + <PackageReference Include="System.ComponentModel.Annotations" /> + </ItemGroup> + + <ItemGroup> + <None Include="README.md" Pack="true" PackagePath="\" /> + <None Include="..\resources\icon.png" Pack="true" PackagePath="\" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Thirdweb.Pay/ThirdwebPay.cs b/Thirdweb.Pay/ThirdwebPay.cs new file mode 100644 index 0000000..51b054a --- /dev/null +++ b/Thirdweb.Pay/ThirdwebPay.cs @@ -0,0 +1,37 @@ +namespace Thirdweb.Pay +{ + public class ThirdwebPay + { + public ThirdwebPayOptions Options { get; private set; } + + private ThirdwebPayClient _client; + + public ThirdwebPay(ThirdwebPayOptions options) + { + Options = options; + + HttpClient payHttpClient = new HttpClient() { DefaultRequestHeaders = { { "x-secret-key", Options.SecretKey } } }; + _client = new ThirdwebPayClient("https://pay.thirdweb.com/", payHttpClient); + } + + public async Task<Result5> GetQuoteAsync(string fromAddress, int fromChainId, string fromTokenAddress, string toTokenAddress, string toAmount) + { + var quote = await _client.GetSwapQuoteAsync(fromAddress: fromAddress, fromChainId: fromChainId, fromTokenAddress: fromTokenAddress, toTokenAddress: toTokenAddress, toAmount: toAmount); + // TODO: Check errors + // TODO: Parse into human readable type + return quote.Result; + } + + // TODO: Swap + + public async Task<Result6> GetSwapStatus(string transactionHash) + { + var swap = await _client.GetSwapStatusAsync(transactionHash); + // TODO: Check errors + // TODO: Parse into human readable type + return swap.Result; + } + + // TODO: History + } +} diff --git a/Thirdweb.Pay/ThirdwebPayClient.cs b/Thirdweb.Pay/ThirdwebPayClient.cs new file mode 100644 index 0000000..db0b384 --- /dev/null +++ b/Thirdweb.Pay/ThirdwebPayClient.cs @@ -0,0 +1,3560 @@ +//---------------------- +// <auto-generated> +// Generated using the NSwag toolchain v14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// </auto-generated> +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" + +namespace Thirdweb.Pay +{ + using System = global::System; + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + internal partial class ThirdwebPayClient + { + #pragma warning disable 8618 + private string _baseUrl; + #pragma warning restore 8618 + + private System.Net.Http.HttpClient _httpClient; + private static System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(CreateSerializerSettings, true); + + public ThirdwebPayClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + } + + private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new Newtonsoft.Json.JsonSerializerSettings(); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set + { + _baseUrl = value; + if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/")) + _baseUrl += '/'; + } + } + + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task JsonAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "json" + urlBuilder_.Append("json"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task HelloPaymentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "hello-payments" + urlBuilder_.Append("hello-payments"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Get config information for a list clientIds + /// </summary> + /// <remarks> + /// Get config information for a list clientIds + /// </remarks> + /// <param name="clientIds">clientIds to query</param> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response> GetAsync(string clientIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (clientIds == null) + throw new System.ArgumentNullException("clientIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "developer" + urlBuilder_.Append("developer"); + urlBuilder_.Append('?'); + urlBuilder_.Append(System.Uri.EscapeDataString("clientIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(clientIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response2>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response2>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response3>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response3>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response4>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response4>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Upserts the developer config for a given client ID + /// </summary> + /// <remarks> + /// Upserts the developer config for a given client ID + /// </remarks> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response5> PutAsync(Body body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (body == null) + throw new System.ArgumentNullException("body"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "developer" + urlBuilder_.Append("developer"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response5>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response6>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response6>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response7>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response7>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response8>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response8>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Get the support chain ids + /// </summary> + /// <remarks> + /// Get the supported chain ids for swapping any token pair + /// </remarks> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response9> Get2Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "chains" + urlBuilder_.Append("chains"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response9>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response10>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response10>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response11>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response11>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response12>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response12>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Get the history for the user + /// </summary> + /// <remarks> + /// Get a history for the user + /// </remarks> + /// <param name="walletAddress">User wallet address to get swap history for</param> + /// <param name="start">offset for the records</param> + /// <param name="count">number of records to retrieve</param> + /// <param name="cursor">Cursor for paging through the history</param> + /// <param name="pageSize">swap statuses to query for</param> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response13> GetSwapHistoryAsync(string walletAddress, double start, double count, string cursor = null, double? pageSize = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (walletAddress == null) + throw new System.ArgumentNullException("walletAddress"); + + if (start == null) + throw new System.ArgumentNullException("start"); + + if (count == null) + throw new System.ArgumentNullException("count"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "buy-with-crypto/history/v1" + urlBuilder_.Append("buy-with-crypto/history/v1"); + urlBuilder_.Append('?'); + urlBuilder_.Append(System.Uri.EscapeDataString("walletAddress")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(walletAddress, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Append(System.Uri.EscapeDataString("start")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(start, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Append(System.Uri.EscapeDataString("count")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response13>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response14>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response14>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response15>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response15>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response16>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response16>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Get a TransactionRequest for a quote + /// </summary> + /// <remarks> + /// Get a quote containing a TransactionRequest for swapping any token pair + /// </remarks> + /// <param name="fromAddress">Sending wallet address</param> + /// <param name="fromChainId">Source chainId</param> + /// <param name="fromTokenAddress">Address of the source token, 0x00…00 for native</param> + /// <param name="toTokenAddress">Address of the destination token, 0x00…00 for native</param> + /// <param name="fromAmount">Amount of source token to send. Requires either fromAmount or toAmount</param> + /// <param name="fromAmountWei">Amount of source token to send in wei. Requires either fromAmount or toAmount</param> + /// <param name="toAddress">To wallet address</param> + /// <param name="toChainId">Destination chainId</param> + /// <param name="toAmount">Minimum amount to receive. Requires either fromAmount or toAmount</param> + /// <param name="toAmountWei">Minimum amount to receive in wei. Requires either fromAmount or toAmount</param> + /// <param name="maxSlippageBPS">Maximum allowed slippage in bps, defaults to 50</param> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response17> GetSwapQuoteAsync(string fromAddress, double fromChainId, string fromTokenAddress, string toTokenAddress, string fromAmount = null, string fromAmountWei = null, string toAddress = null, double? toChainId = null, string toAmount = null, string toAmountWei = null, double? maxSlippageBPS = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (fromAddress == null) + throw new System.ArgumentNullException("fromAddress"); + + if (fromChainId == null) + throw new System.ArgumentNullException("fromChainId"); + + if (fromTokenAddress == null) + throw new System.ArgumentNullException("fromTokenAddress"); + + if (toTokenAddress == null) + throw new System.ArgumentNullException("toTokenAddress"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "buy-with-crypto/quote/v1" + urlBuilder_.Append("buy-with-crypto/quote/v1"); + urlBuilder_.Append('?'); + urlBuilder_.Append(System.Uri.EscapeDataString("fromAddress")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fromAddress, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Append(System.Uri.EscapeDataString("fromChainId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fromChainId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Append(System.Uri.EscapeDataString("fromTokenAddress")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fromTokenAddress, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Append(System.Uri.EscapeDataString("toTokenAddress")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(toTokenAddress, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + if (fromAmount != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("fromAmount")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fromAmount, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (fromAmountWei != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("fromAmountWei")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fromAmountWei, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (toAddress != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("toAddress")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(toAddress, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (toChainId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("toChainId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(toChainId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (toAmount != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("toAmount")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(toAmount, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (toAmountWei != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("toAmountWei")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(toAmountWei, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (maxSlippageBPS != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("maxSlippageBPS")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(maxSlippageBPS, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response17>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response18>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response18>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response19>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response19>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response20>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response20>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Get the status of a transaction + /// </summary> + /// <remarks> + /// Get the transaction status of a bridge or swap + /// </remarks> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response21> GetSwapStatusAsync(string transactionHash, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (transactionHash == null) + throw new System.ArgumentNullException("transactionHash"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "buy-with-crypto/status/v1" + urlBuilder_.Append("buy-with-crypto/status/v1"); + urlBuilder_.Append('?'); + urlBuilder_.Append(System.Uri.EscapeDataString("transactionHash")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(transactionHash, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response21>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response22>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response22>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response23>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response23>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response24>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response24>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Create a developer + /// </summary> + /// <remarks> + /// Create a developer given their thirdweb account id + /// </remarks> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response25> CreateDeveloperAsync(Body2 body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (body == null) + throw new System.ArgumentNullException("body"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "developer/create" + urlBuilder_.Append("developer/create"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response25>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response26>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response26>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response27>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response27>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response28>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response28>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <summary> + /// Delete a developer + /// </summary> + /// <remarks> + /// Delete a developer given their thirdweb account id + /// </remarks> + /// <returns>Default Response</returns> + /// <exception cref="ThirdwebPayException">A server side error occurred.</exception> + public virtual async System.Threading.Tasks.Task<Response29> DeleteDeveloperAsync(object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "developer/delete" + urlBuilder_.Append("developer/delete"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync<Response29>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync<Response30>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response30>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync<Response31>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response31>("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync<Response32>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ThirdwebPayException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ThirdwebPayException<Response32>("Internal Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ThirdwebPayException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult<T> + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult<T>(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings); + return new ObjectResponseResult<T>(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ThirdwebPayException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize<T>(jsonTextReader); + return new ObjectResponseResult<T>(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ThirdwebPayException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value is string[]) + { + return string.Join(",", (string[])value); + } + else if (value.GetType().IsArray) + { + var valueArray = (System.Array)value; + var valueTextArray = new string[valueArray.Length]; + for (var i = 0; i < valueArray.Length; i++) + { + valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo); + } + return string.Join(",", valueTextArray); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Body + { + /// <summary> + /// the payout address of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("payoutAddress", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PayoutAddress { get; set; } + + /// <summary> + /// the client id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ClientId { get; set; } + + /// <summary> + /// the email of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// <summary> + /// the thirdweb account id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebAccountId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ThirdwebAccountId { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Body2 + { + /// <summary> + /// the id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// <summary> + /// the email of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Email { get; set; } + + /// <summary> + /// the payout address of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("payoutAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string PayoutAddress { get; set; } + + /// <summary> + /// the thirdweb fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(50, int.MaxValue)] + public int ThirdwebFeeBPS { get; set; } + + /// <summary> + /// the developer fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("developerFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)] + public int DeveloperFeeBPS { get; set; } + + [Newtonsoft.Json.JsonProperty("deletedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset DeletedAt { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public System.Collections.Generic.ICollection<Result> Result { get; set; } = new System.Collections.ObjectModel.Collection<Result>(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response2 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response3 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error2 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response4 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error3 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response5 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Result2 Result { get; set; } = new Result2(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response6 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error4 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response7 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error5 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response8 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error6 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response9 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Result3 Result { get; set; } = new Result3(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response10 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error7 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response11 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error8 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response12 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error9 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response13 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + public Result4 Result { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response14 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error10 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response15 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error11 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response16 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error12 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response17 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Result5 Result { get; set; } = new Result5(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response18 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error13 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response19 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error14 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response20 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error15 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response21 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + public Result6 Result { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response22 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error16 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response23 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error17 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response24 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error18 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response25 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Result7 Result { get; set; } = new Result7(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response26 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error19 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response27 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error20 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response28 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error21 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response29 + { + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Result8 Result { get; set; } = new Result8(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Bad Request + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response30 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error22 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Not Found + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response31 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error23 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + /// <summary> + /// Internal Server Error + /// </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Response32 + { + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Error24 Error { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result + { + /// <summary> + /// the id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + /// <summary> + /// the client id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ClientId { get; set; } + + /// <summary> + /// the thirdweb account id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebAccountId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ThirdwebAccountId { get; set; } + + /// <summary> + /// the email of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Email { get; set; } + + /// <summary> + /// the payout address of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("payoutAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string PayoutAddress { get; set; } + + /// <summary> + /// the thirdweb fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(100, int.MaxValue)] + public int ThirdwebFeeBPS { get; set; } + + /// <summary> + /// the developer fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("developerFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)] + public int DeveloperFeeBPS { get; set; } + + [Newtonsoft.Json.JsonProperty("createdAt", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string CreatedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("updatedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UpdatedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("deletedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DeletedAt { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error2 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error3 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result2 + { + /// <summary> + /// the id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + /// <summary> + /// the client id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ClientId { get; set; } + + /// <summary> + /// the thirdweb account id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebAccountId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ThirdwebAccountId { get; set; } + + /// <summary> + /// the email of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Email { get; set; } + + /// <summary> + /// the payout address of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("payoutAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string PayoutAddress { get; set; } + + /// <summary> + /// the thirdweb fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(100, int.MaxValue)] + public int ThirdwebFeeBPS { get; set; } + + /// <summary> + /// the developer fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("developerFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)] + public int DeveloperFeeBPS { get; set; } + + [Newtonsoft.Json.JsonProperty("createdAt", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string CreatedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("updatedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UpdatedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("deletedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DeletedAt { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error4 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error5 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error6 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result3 + { + [Newtonsoft.Json.JsonProperty("chainIds", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public System.Collections.Generic.ICollection<double> ChainIds { get; set; } = new System.Collections.ObjectModel.Collection<double>(); + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error7 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error8 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error9 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result4 + { + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error10 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error11 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error12 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result5 + { + /// <summary> + /// id for the quote + /// </summary> + [Newtonsoft.Json.JsonProperty("quoteId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string QuoteId { get; set; } + + /// <summary> + /// Unsigned transaction to be executed + /// </summary> + [Newtonsoft.Json.JsonProperty("transactionRequest", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public TransactionRequest TransactionRequest { get; set; } = new TransactionRequest(); + + [Newtonsoft.Json.JsonProperty("approval", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Approval Approval { get; set; } + + /// <summary> + /// Sending wallet address + /// </summary> + [Newtonsoft.Json.JsonProperty("fromAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string FromAddress { get; set; } + + /// <summary> + /// receiving wallet address + /// </summary> + [Newtonsoft.Json.JsonProperty("toAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string ToAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("fromToken", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public FromToken FromToken { get; set; } = new FromToken(); + + [Newtonsoft.Json.JsonProperty("toToken", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public ToToken ToToken { get; set; } = new ToToken(); + + /// <summary> + /// Amount of source token to send in wei + /// </summary> + [Newtonsoft.Json.JsonProperty("fromAmountWei", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string FromAmountWei { get; set; } + + /// <summary> + /// Amount of source token to send in eth + /// </summary> + [Newtonsoft.Json.JsonProperty("fromAmount", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string FromAmount { get; set; } + + /// <summary> + /// Minimum amount of destination token to receive in wei + /// </summary> + [Newtonsoft.Json.JsonProperty("toAmountMinWei", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ToAmountMinWei { get; set; } + + /// <summary> + /// Minimum amount of destination token to receive in eth + /// </summary> + [Newtonsoft.Json.JsonProperty("toAmountMin", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ToAmountMin { get; set; } + + /// <summary> + /// Estimated amount of destination token to receive in wei + /// </summary> + [Newtonsoft.Json.JsonProperty("toAmountWei", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ToAmountWei { get; set; } + + /// <summary> + /// Estimated amount of destination token to receive in eth + /// </summary> + [Newtonsoft.Json.JsonProperty("toAmount", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ToAmount { get; set; } + + /// <summary> + /// List of required payment tokens, including fee tokens + /// </summary> + [Newtonsoft.Json.JsonProperty("paymentTokens", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public System.Collections.Generic.ICollection<PaymentTokens> PaymentTokens { get; set; } = new System.Collections.ObjectModel.Collection<PaymentTokens>(); + + /// <summary> + /// List of processing fees in tokens + /// </summary> + [Newtonsoft.Json.JsonProperty("processingFees", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public System.Collections.Generic.ICollection<ProcessingFees> ProcessingFees { get; set; } = new System.Collections.ObjectModel.Collection<ProcessingFees>(); + + [Newtonsoft.Json.JsonProperty("estimated", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Estimated Estimated { get; set; } = new Estimated(); + + /// <summary> + /// Maximum allowed slippage for the swap + /// </summary> + [Newtonsoft.Json.JsonProperty("maxSlippageBPS", Required = Newtonsoft.Json.Required.Always)] + public double MaxSlippageBPS { get; set; } + + /// <summary> + /// The bridge used + /// </summary> + [Newtonsoft.Json.JsonProperty("bridge", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Bridge { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error13 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error14 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error15 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result6 + { + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error16 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error17 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error18 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result7 + { + /// <summary> + /// the id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Id { get; set; } + + /// <summary> + /// the client id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ClientId { get; set; } + + /// <summary> + /// the thirdweb account id of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebAccountId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ThirdwebAccountId { get; set; } + + /// <summary> + /// the email of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Email { get; set; } + + /// <summary> + /// the payout address of the developer + /// </summary> + [Newtonsoft.Json.JsonProperty("payoutAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string PayoutAddress { get; set; } + + /// <summary> + /// the thirdweb fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("thirdwebFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(100, int.MaxValue)] + public int ThirdwebFeeBPS { get; set; } + + /// <summary> + /// the developer fee basis points + /// </summary> + [Newtonsoft.Json.JsonProperty("developerFeeBPS", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)] + public int DeveloperFeeBPS { get; set; } + + [Newtonsoft.Json.JsonProperty("createdAt", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string CreatedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("updatedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UpdatedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("deletedAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DeletedAt { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error19 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error20 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error21 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Result8 + { + [Newtonsoft.Json.JsonProperty("developerId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string DeveloperId { get; set; } + + [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ClientId { get; set; } + + [Newtonsoft.Json.JsonProperty("thirdwebAccountId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string ThirdwebAccountId { get; set; } + + [Newtonsoft.Json.JsonProperty("deletedAt", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string DeletedAt { get; set; } + + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error22 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error23 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Error24 + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("stack", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Stack { get; set; } + + [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double StatusCode { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class TransactionRequest + { + /// <summary> + /// unsigned transaction data + /// </summary> + [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string Data { get; set; } + + /// <summary> + /// address receiving the transaction + /// </summary> + [Newtonsoft.Json.JsonProperty("to", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string To { get; set; } + + /// <summary> + /// value to be sent + /// </summary> + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Value { get; set; } + + /// <summary> + /// address of the transaction sender + /// </summary> + [Newtonsoft.Json.JsonProperty("from", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string From { get; set; } + + /// <summary> + /// chainId the transaction is being performed on + /// </summary> + [Newtonsoft.Json.JsonProperty("chainId", Required = Newtonsoft.Json.Required.Always)] + public double ChainId { get; set; } + + /// <summary> + /// gas price in wei of native currency + /// </summary> + [Newtonsoft.Json.JsonProperty("gasPrice", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string GasPrice { get; set; } + + /// <summary> + /// max amount of gas for the transaction + /// </summary> + [Newtonsoft.Json.JsonProperty("gasLimit", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string GasLimit { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Approval + { + /// <summary> + /// Approval token chainId + /// </summary> + [Newtonsoft.Json.JsonProperty("chainId", Required = Newtonsoft.Json.Required.Always)] + public double ChainId { get; set; } + + [Newtonsoft.Json.JsonProperty("tokenAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string TokenAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("spenderAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string SpenderAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("amountWei", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string AmountWei { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class FromToken + { + /// <summary> + /// Token chainId + /// </summary> + [Newtonsoft.Json.JsonProperty("chainId", Required = Newtonsoft.Json.Required.Always)] + public double ChainId { get; set; } + + /// <summary> + /// Address of the token, 0x00…00 for native + /// </summary> + [Newtonsoft.Json.JsonProperty("tokenAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string TokenAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("decimals", Required = Newtonsoft.Json.Required.Always)] + public int Decimals { get; set; } + + [Newtonsoft.Json.JsonProperty("priceUSDCents", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int PriceUSDCents { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("symbol", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Symbol { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ToToken + { + /// <summary> + /// Token chainId + /// </summary> + [Newtonsoft.Json.JsonProperty("chainId", Required = Newtonsoft.Json.Required.Always)] + public double ChainId { get; set; } + + /// <summary> + /// Address of the token, 0x00…00 for native + /// </summary> + [Newtonsoft.Json.JsonProperty("tokenAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string TokenAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("decimals", Required = Newtonsoft.Json.Required.Always)] + public int Decimals { get; set; } + + [Newtonsoft.Json.JsonProperty("priceUSDCents", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int PriceUSDCents { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("symbol", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Symbol { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PaymentTokens + { + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Token Token { get; set; } = new Token(); + + /// <summary> + /// Amount of the token required in wei + /// </summary> + [Newtonsoft.Json.JsonProperty("amountWei", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string AmountWei { get; set; } + + /// <summary> + /// Amount of the token required in the token's unit + /// </summary> + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Amount { get; set; } + + /// <summary> + /// Amount of the token required in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("amountUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double AmountUSDCents { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProcessingFees + { + [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public Token2 Token { get; set; } = new Token2(); + + /// <summary> + /// Amount of the token required in wei + /// </summary> + [Newtonsoft.Json.JsonProperty("amountWei", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string AmountWei { get; set; } + + /// <summary> + /// Amount of the token required in the token's unit + /// </summary> + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public string Amount { get; set; } + + /// <summary> + /// Amount of the token required in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("amountUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double AmountUSDCents { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Estimated + { + /// <summary> + /// Amount of source token to send in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("fromAmountUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double FromAmountUSDCents { get; set; } + + /// <summary> + /// Minimum amount of destination token to receive in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("toAmountMinUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double ToAmountMinUSDCents { get; set; } + + /// <summary> + /// Estimated amount of destination token to receive in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("toAmountUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double ToAmountUSDCents { get; set; } + + /// <summary> + /// Estimated slippage for the swap + /// </summary> + [Newtonsoft.Json.JsonProperty("slippageBPS", Required = Newtonsoft.Json.Required.Always)] + public double SlippageBPS { get; set; } + + /// <summary> + /// Estimated total transaction service fees in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("feesUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double FeesUSDCents { get; set; } + + /// <summary> + /// Estimated total transaction gas fees in USD Cents + /// </summary> + [Newtonsoft.Json.JsonProperty("gasCostUSDCents", Required = Newtonsoft.Json.Required.Always)] + public double GasCostUSDCents { get; set; } + + /// <summary> + /// Estimated transaction execution time in seconds + /// </summary> + [Newtonsoft.Json.JsonProperty("durationSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double DurationSeconds { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Token + { + /// <summary> + /// Token chainId + /// </summary> + [Newtonsoft.Json.JsonProperty("chainId", Required = Newtonsoft.Json.Required.Always)] + public double ChainId { get; set; } + + /// <summary> + /// Address of the token, 0x00…00 for native + /// </summary> + [Newtonsoft.Json.JsonProperty("tokenAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string TokenAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("decimals", Required = Newtonsoft.Json.Required.Always)] + public int Decimals { get; set; } + + [Newtonsoft.Json.JsonProperty("priceUSDCents", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int PriceUSDCents { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("symbol", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Symbol { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Token2 + { + /// <summary> + /// Token chainId + /// </summary> + [Newtonsoft.Json.JsonProperty("chainId", Required = Newtonsoft.Json.Required.Always)] + public double ChainId { get; set; } + + /// <summary> + /// Address of the token, 0x00…00 for native + /// </summary> + [Newtonsoft.Json.JsonProperty("tokenAddress", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(42, MinimumLength = 42)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^0x")] + public string TokenAddress { get; set; } + + [Newtonsoft.Json.JsonProperty("decimals", Required = Newtonsoft.Json.Required.Always)] + public int Decimals { get; set; } + + [Newtonsoft.Json.JsonProperty("priceUSDCents", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int PriceUSDCents { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("symbol", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Symbol { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + + + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ThirdwebPayException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } + + public ThirdwebPayException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.4.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ThirdwebPayException<TResult> : ThirdwebPayException + { + public TResult Result { get; private set; } + + public ThirdwebPayException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} + +#pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 +#pragma warning restore 3016 +#pragma warning restore 8603 +#pragma warning restore 8604 +#pragma warning restore 8625 \ No newline at end of file diff --git a/Thirdweb.Pay/ThirdwebPayOptions.cs b/Thirdweb.Pay/ThirdwebPayOptions.cs new file mode 100644 index 0000000..74a19cb --- /dev/null +++ b/Thirdweb.Pay/ThirdwebPayOptions.cs @@ -0,0 +1,18 @@ +namespace Thirdweb.Pay +{ + public class ThirdwebPayOptions + { + private string _secretKey; + + internal string SecretKey => _secretKey; + internal string ClientId { get; private set; } + internal string BundleId { get; private set; } + + public ThirdwebPayOptions(string clientId = null, string secretKey = null, string bundleId = null) + { + _secretKey = secretKey; + ClientId = clientId; + BundleId = bundleId; + } + } +} diff --git a/Thirdweb/Thirdweb.csproj b/Thirdweb/Thirdweb.csproj index 61acf63..f06af39 100644 --- a/Thirdweb/Thirdweb.csproj +++ b/Thirdweb/Thirdweb.csproj @@ -32,6 +32,10 @@ <PackageReference Include="Nethereum.Contracts" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Thirdweb.Pay\Thirdweb.Pay.csproj" /> + </ItemGroup> + <ItemGroup> <None Include="..\README.md" Pack="true" PackagePath="\" /> <None Include="..\resources\icon.png" Pack="true" PackagePath="\" /> diff --git a/thirdweb.sln b/thirdweb.sln index 27239a2..79647d4 100644 --- a/thirdweb.sln +++ b/thirdweb.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Thirdweb.Console", "Thirdwe EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Thirdweb.Tests", "Thirdweb.Tests\Thirdweb.Tests.csproj", "{7CEBE316-4F2E-433B-8B1D-CBE8F8EE328F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Thirdweb.Pay", "Thirdweb.Pay\Thirdweb.Pay.csproj", "{55D4834C-DC17-4805-935B-2E0812E90D2D}" +EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -58,5 +60,17 @@ Global {7CEBE316-4F2E-433B-8B1D-CBE8F8EE328F}.Release|x64.Build.0 = Release|Any CPU {7CEBE316-4F2E-433B-8B1D-CBE8F8EE328F}.Release|x86.ActiveCfg = Release|Any CPU {7CEBE316-4F2E-433B-8B1D-CBE8F8EE328F}.Release|x86.Build.0 = Release|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Debug|x64.ActiveCfg = Debug|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Debug|x64.Build.0 = Debug|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Debug|x86.ActiveCfg = Debug|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Debug|x86.Build.0 = Debug|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Release|Any CPU.Build.0 = Release|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Release|x64.ActiveCfg = Release|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Release|x64.Build.0 = Release|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Release|x86.ActiveCfg = Release|Any CPU + {55D4834C-DC17-4805-935B-2E0812E90D2D}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal