diff --git a/src/SchematicHQ.Client.sln b/src/SchematicHQ.Client.sln index f214240..47a1c00 100644 --- a/src/SchematicHQ.Client.sln +++ b/src/SchematicHQ.Client.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchematicHQ.Client", "SchematicHQ.Client\SchematicHQ.Client.csproj", "{C7897C78-B2CF-41F1-8A88-ADD58148B4CC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchematicHQ.Client", "SchematicHQ.Client\SchematicHQ.Client.csproj", "{E7771BBA-84C4-45BC-B17E-8543DD56DB16}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchematicHQ.Client.Test", "SchematicHQ.Client.Test\SchematicHQ.Client.Test.csproj", "{F15D4EF4-BEA7-404C-9599-ECCE91902E80}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchematicHQ.Client.Test", "SchematicHQ.Client.Test\SchematicHQ.Client.Test.csproj", "{EDB5E614-3078-440F-AC5A-7E358CA53164}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -16,13 +16,13 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C7897C78-B2CF-41F1-8A88-ADD58148B4CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7897C78-B2CF-41F1-8A88-ADD58148B4CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7897C78-B2CF-41F1-8A88-ADD58148B4CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7897C78-B2CF-41F1-8A88-ADD58148B4CC}.Release|Any CPU.Build.0 = Release|Any CPU - {F15D4EF4-BEA7-404C-9599-ECCE91902E80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F15D4EF4-BEA7-404C-9599-ECCE91902E80}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F15D4EF4-BEA7-404C-9599-ECCE91902E80}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F15D4EF4-BEA7-404C-9599-ECCE91902E80}.Release|Any CPU.Build.0 = Release|Any CPU + {E7771BBA-84C4-45BC-B17E-8543DD56DB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7771BBA-84C4-45BC-B17E-8543DD56DB16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7771BBA-84C4-45BC-B17E-8543DD56DB16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7771BBA-84C4-45BC-B17E-8543DD56DB16}.Release|Any CPU.Build.0 = Release|Any CPU + {EDB5E614-3078-440F-AC5A-7E358CA53164}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDB5E614-3078-440F-AC5A-7E358CA53164}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDB5E614-3078-440F-AC5A-7E358CA53164}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDB5E614-3078-440F-AC5A-7E358CA53164}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/SchematicHQ.Client/Accounts/AccountsClient.cs b/src/SchematicHQ.Client/Accounts/AccountsClient.cs index 8041265..da7a518 100644 --- a/src/SchematicHQ.Client/Accounts/AccountsClient.cs +++ b/src/SchematicHQ.Client/Accounts/AccountsClient.cs @@ -28,18 +28,18 @@ public async Task ListApiKeysAsync( ) { var _query = new Dictionary(); - _query["require_environment"] = request.RequireEnvironment.ToString(); + _query["require_environment"] = JsonUtils.Serialize(request.RequireEnvironment); if (request.EnvironmentId != null) { _query["environment_id"] = request.EnvironmentId; } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -345,18 +345,18 @@ public async Task CountApiKeysAsync( ) { var _query = new Dictionary(); - _query["require_environment"] = request.RequireEnvironment.ToString(); + _query["require_environment"] = JsonUtils.Serialize(request.RequireEnvironment); if (request.EnvironmentId != null) { _query["environment_id"] = request.EnvironmentId; } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -433,11 +433,11 @@ public async Task ListApiRequestsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -573,11 +573,11 @@ public async Task CountApiRequestsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -643,11 +643,11 @@ public async Task ListEnvironmentsAsync( _query["ids"] = request.Ids; if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/Billing/BillingClient.cs b/src/SchematicHQ.Client/Billing/BillingClient.cs index 2dfbab4..03d26c0 100644 --- a/src/SchematicHQ.Client/Billing/BillingClient.cs +++ b/src/SchematicHQ.Client/Billing/BillingClient.cs @@ -177,7 +177,7 @@ public async Task ListCustomersAsync( } if (request.FailedToImport != null) { - _query["failed_to_import"] = request.FailedToImport.ToString(); + _query["failed_to_import"] = JsonUtils.Serialize(request.FailedToImport.Value); } if (request.Q != null) { @@ -185,11 +185,11 @@ public async Task ListCustomersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -258,7 +258,7 @@ public async Task CountCustomersAsync( } if (request.FailedToImport != null) { - _query["failed_to_import"] = request.FailedToImport.ToString(); + _query["failed_to_import"] = JsonUtils.Serialize(request.FailedToImport.Value); } if (request.Q != null) { @@ -266,11 +266,11 @@ public async Task CountCustomersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -346,11 +346,11 @@ public async Task ListInvoicesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -491,11 +491,11 @@ public async Task ListMetersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -640,11 +640,11 @@ public async Task ListPaymentMethodsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -786,15 +786,15 @@ public async Task SearchBillingPricesAsync( } if (request.Price != null) { - _query["price"] = request.Price.ToString(); + _query["price"] = request.Price.Value.ToString(); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -944,23 +944,25 @@ public async Task ListProductPricesAsync( } if (request.WithoutLinkedToPlan != null) { - _query["without_linked_to_plan"] = request.WithoutLinkedToPlan.ToString(); + _query["without_linked_to_plan"] = JsonUtils.Serialize( + request.WithoutLinkedToPlan.Value + ); } if (request.WithZeroPrice != null) { - _query["with_zero_price"] = request.WithZeroPrice.ToString(); + _query["with_zero_price"] = JsonUtils.Serialize(request.WithZeroPrice.Value); } if (request.WithPricesOnly != null) { - _query["with_prices_only"] = request.WithPricesOnly.ToString(); + _query["with_prices_only"] = JsonUtils.Serialize(request.WithPricesOnly.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1167,23 +1169,25 @@ public async Task ListBillingProductsAsync( } if (request.WithoutLinkedToPlan != null) { - _query["without_linked_to_plan"] = request.WithoutLinkedToPlan.ToString(); + _query["without_linked_to_plan"] = JsonUtils.Serialize( + request.WithoutLinkedToPlan.Value + ); } if (request.WithZeroPrice != null) { - _query["with_zero_price"] = request.WithZeroPrice.ToString(); + _query["with_zero_price"] = JsonUtils.Serialize(request.WithZeroPrice.Value); } if (request.WithPricesOnly != null) { - _query["with_prices_only"] = request.WithPricesOnly.ToString(); + _query["with_prices_only"] = JsonUtils.Serialize(request.WithPricesOnly.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1261,23 +1265,25 @@ public async Task CountBillingProductsAsync( } if (request.WithoutLinkedToPlan != null) { - _query["without_linked_to_plan"] = request.WithoutLinkedToPlan.ToString(); + _query["without_linked_to_plan"] = JsonUtils.Serialize( + request.WithoutLinkedToPlan.Value + ); } if (request.WithZeroPrice != null) { - _query["with_zero_price"] = request.WithZeroPrice.ToString(); + _query["with_zero_price"] = JsonUtils.Serialize(request.WithZeroPrice.Value); } if (request.WithPricesOnly != null) { - _query["with_prices_only"] = request.WithPricesOnly.ToString(); + _query["with_prices_only"] = JsonUtils.Serialize(request.WithPricesOnly.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/Companies/CompaniesClient.cs b/src/SchematicHQ.Client/Companies/CompaniesClient.cs index 3f34736..dbacb51 100644 --- a/src/SchematicHQ.Client/Companies/CompaniesClient.cs +++ b/src/SchematicHQ.Client/Companies/CompaniesClient.cs @@ -43,15 +43,15 @@ public async Task ListCompaniesAsync( } if (request.WithoutPlan != null) { - _query["without_plan"] = request.WithoutPlan.ToString(); + _query["without_plan"] = JsonUtils.Serialize(request.WithoutPlan.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -310,15 +310,15 @@ public async Task CountCompaniesAsync( } if (request.WithoutPlan != null) { - _query["without_plan"] = request.WithoutPlan.ToString(); + _query["without_plan"] = JsonUtils.Serialize(request.WithoutPlan.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -518,7 +518,7 @@ public async Task LookupCompanyAsync( ) { var _query = new Dictionary(); - _query["keys"] = request.Keys.ToString(); + _query["keys"] = JsonUtils.Serialize(request.Keys); var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest { @@ -586,11 +586,11 @@ public async Task GetActiveDealsAsync( _query["deal_stage"] = request.DealStage; if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -663,11 +663,11 @@ public async Task ListCompanyMembershipsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -859,11 +859,11 @@ public async Task GetActiveCompanySubscrip } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1004,11 +1004,11 @@ public async Task ListEntityKeyDefinitionsAsyn } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1082,11 +1082,11 @@ public async Task CountEntityKeyDefinitionsAs } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1164,11 +1164,11 @@ public async Task ListEntityTraitDefinitions } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1445,11 +1445,11 @@ public async Task CountEntityTraitDefinitio } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1521,11 +1521,11 @@ public async Task GetEntityTraitValuesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1670,11 +1670,11 @@ public async Task ListUsersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1937,11 +1937,11 @@ public async Task CountUsersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -2145,7 +2145,7 @@ public async Task LookupUserAsync( ) { var _query = new Dictionary(); - _query["keys"] = request.Keys.ToString(); + _query["keys"] = JsonUtils.Serialize(request.Keys); var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest { diff --git a/src/SchematicHQ.Client/Components/ComponentsClient.cs b/src/SchematicHQ.Client/Components/ComponentsClient.cs index af62b5d..24472db 100644 --- a/src/SchematicHQ.Client/Components/ComponentsClient.cs +++ b/src/SchematicHQ.Client/Components/ComponentsClient.cs @@ -34,11 +34,11 @@ public async Task ListComponentsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -356,11 +356,11 @@ public async Task CountComponentsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/Core/Public/Version.cs b/src/SchematicHQ.Client/Core/Public/Version.cs index ce55b74..b47e42a 100644 --- a/src/SchematicHQ.Client/Core/Public/Version.cs +++ b/src/SchematicHQ.Client/Core/Public/Version.cs @@ -2,5 +2,5 @@ namespace SchematicHQ.Client; internal class Version { - public const string Current = "1.0.4"; + public const string Current = "1.0.5"; } diff --git a/src/SchematicHQ.Client/Crm/CrmClient.cs b/src/SchematicHQ.Client/Crm/CrmClient.cs index 2e3457d..1482399 100644 --- a/src/SchematicHQ.Client/Crm/CrmClient.cs +++ b/src/SchematicHQ.Client/Crm/CrmClient.cs @@ -240,11 +240,11 @@ public async Task ListCrmProductsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/Entitlements/EntitlementsClient.cs b/src/SchematicHQ.Client/Entitlements/EntitlementsClient.cs index 8a28dde..9f858d1 100644 --- a/src/SchematicHQ.Client/Entitlements/EntitlementsClient.cs +++ b/src/SchematicHQ.Client/Entitlements/EntitlementsClient.cs @@ -41,7 +41,7 @@ public async Task ListCompanyOverridesAsync( } if (request.WithoutExpired != null) { - _query["without_expired"] = request.WithoutExpired.ToString(); + _query["without_expired"] = JsonUtils.Serialize(request.WithoutExpired.Value); } if (request.Q != null) { @@ -49,11 +49,11 @@ public async Task ListCompanyOverridesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -385,7 +385,7 @@ public async Task CountCompanyOverridesAsync( } if (request.WithoutExpired != null) { - _query["without_expired"] = request.WithoutExpired.ToString(); + _query["without_expired"] = JsonUtils.Serialize(request.WithoutExpired.Value); } if (request.Q != null) { @@ -393,11 +393,11 @@ public async Task CountCompanyOverridesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -469,11 +469,11 @@ public async Task ListFeatureCompaniesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -545,11 +545,11 @@ public async Task CountFeatureCompaniesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -619,7 +619,7 @@ public async Task ListFeatureUsageAsync( } if (request.CompanyKeys != null) { - _query["company_keys"] = request.CompanyKeys.ToString(); + _query["company_keys"] = JsonUtils.Serialize(request.CompanyKeys); } if (request.Q != null) { @@ -627,16 +627,17 @@ public async Task ListFeatureUsageAsync( } if (request.WithoutNegativeEntitlements != null) { - _query["without_negative_entitlements"] = - request.WithoutNegativeEntitlements.ToString(); + _query["without_negative_entitlements"] = JsonUtils.Serialize( + request.WithoutNegativeEntitlements.Value + ); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -706,7 +707,7 @@ public async Task CountFeatureUsageAsync( } if (request.CompanyKeys != null) { - _query["company_keys"] = request.CompanyKeys.ToString(); + _query["company_keys"] = JsonUtils.Serialize(request.CompanyKeys); } if (request.Q != null) { @@ -714,16 +715,17 @@ public async Task CountFeatureUsageAsync( } if (request.WithoutNegativeEntitlements != null) { - _query["without_negative_entitlements"] = - request.WithoutNegativeEntitlements.ToString(); + _query["without_negative_entitlements"] = JsonUtils.Serialize( + request.WithoutNegativeEntitlements.Value + ); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -795,11 +797,11 @@ public async Task ListFeatureUsersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -871,11 +873,11 @@ public async Task CountFeatureUsersAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -955,15 +957,17 @@ public async Task ListPlanEntitlementsAsync( } if (request.WithMeteredProducts != null) { - _query["with_metered_products"] = request.WithMeteredProducts.ToString(); + _query["with_metered_products"] = JsonUtils.Serialize( + request.WithMeteredProducts.Value + ); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1299,15 +1303,17 @@ public async Task CountPlanEntitlementsAsync( } if (request.WithMeteredProducts != null) { - _query["with_metered_products"] = request.WithMeteredProducts.ToString(); + _query["with_metered_products"] = JsonUtils.Serialize( + request.WithMeteredProducts.Value + ); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1381,7 +1387,7 @@ public async Task GetFeatureUsageByCompanyAsyn ) { var _query = new Dictionary(); - _query["keys"] = request.Keys.ToString(); + _query["keys"] = JsonUtils.Serialize(request.Keys); var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest { diff --git a/src/SchematicHQ.Client/Events/EventsClient.cs b/src/SchematicHQ.Client/Events/EventsClient.cs index ea90739..777c3ef 100644 --- a/src/SchematicHQ.Client/Events/EventsClient.cs +++ b/src/SchematicHQ.Client/Events/EventsClient.cs @@ -104,11 +104,11 @@ public async Task GetEventSummariesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -186,11 +186,11 @@ public async Task ListEventsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/Features/FeaturesClient.cs b/src/SchematicHQ.Client/Features/FeaturesClient.cs index 6190d43..88af269 100644 --- a/src/SchematicHQ.Client/Features/FeaturesClient.cs +++ b/src/SchematicHQ.Client/Features/FeaturesClient.cs @@ -399,11 +399,11 @@ public async Task ListFeaturesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -731,11 +731,11 @@ public async Task CountFeaturesAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -809,11 +809,11 @@ public async Task ListFlagsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -1375,11 +1375,11 @@ public async Task CountFlagsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/Plans/PlansClient.cs b/src/SchematicHQ.Client/Plans/PlansClient.cs index 42d63d4..8872a5f 100644 --- a/src/SchematicHQ.Client/Plans/PlansClient.cs +++ b/src/SchematicHQ.Client/Plans/PlansClient.cs @@ -313,7 +313,7 @@ public async Task ListPlansAsync( } if (request.HasProductId != null) { - _query["has_product_id"] = request.HasProductId.ToString(); + _query["has_product_id"] = JsonUtils.Serialize(request.HasProductId.Value); } if (request.PlanType != null) { @@ -329,15 +329,15 @@ public async Task ListPlansAsync( } if (request.WithoutProductId != null) { - _query["without_product_id"] = request.WithoutProductId.ToString(); + _query["without_product_id"] = JsonUtils.Serialize(request.WithoutProductId.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -724,7 +724,7 @@ public async Task CountPlansAsync( } if (request.HasProductId != null) { - _query["has_product_id"] = request.HasProductId.ToString(); + _query["has_product_id"] = JsonUtils.Serialize(request.HasProductId.Value); } if (request.PlanType != null) { @@ -740,15 +740,15 @@ public async Task CountPlansAsync( } if (request.WithoutProductId != null) { - _query["without_product_id"] = request.WithoutProductId.ToString(); + _query["without_product_id"] = JsonUtils.Serialize(request.WithoutProductId.Value); } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest diff --git a/src/SchematicHQ.Client/SchematicApi.cs b/src/SchematicHQ.Client/SchematicApi.cs index a2686e3..f4bf22d 100644 --- a/src/SchematicHQ.Client/SchematicApi.cs +++ b/src/SchematicHQ.Client/SchematicApi.cs @@ -20,7 +20,7 @@ public SchematicApi(string? apiKey = null, ClientOptions? clientOptions = null) { "X-Fern-Language", "C#" }, { "X-Fern-SDK-Name", "SchematicHQ.Client" }, { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "SchematicHQ.Client/1.0.4" }, + { "User-Agent", "SchematicHQ.Client/1.0.5" }, } ); clientOptions ??= new ClientOptions(); diff --git a/src/SchematicHQ.Client/SchematicHQ.Client.csproj b/src/SchematicHQ.Client/SchematicHQ.Client.csproj index 2b6eb8f..977b34c 100644 --- a/src/SchematicHQ.Client/SchematicHQ.Client.csproj +++ b/src/SchematicHQ.Client/SchematicHQ.Client.csproj @@ -6,7 +6,7 @@ enable 12 enable - 1.0.4 + 1.0.5 $(Version) $(Version) README.md diff --git a/src/SchematicHQ.Client/Webhooks/WebhooksClient.cs b/src/SchematicHQ.Client/Webhooks/WebhooksClient.cs index 9121fc6..02d4983 100644 --- a/src/SchematicHQ.Client/Webhooks/WebhooksClient.cs +++ b/src/SchematicHQ.Client/Webhooks/WebhooksClient.cs @@ -39,11 +39,11 @@ public async Task ListWebhookEventsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -176,11 +176,11 @@ public async Task CountWebhookEventsAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -249,11 +249,11 @@ public async Task ListWebhooksAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest @@ -575,11 +575,11 @@ public async Task CountWebhooksAsync( } if (request.Limit != null) { - _query["limit"] = request.Limit.ToString(); + _query["limit"] = request.Limit.Value.ToString(); } if (request.Offset != null) { - _query["offset"] = request.Offset.ToString(); + _query["offset"] = request.Offset.Value.ToString(); } var response = await _client.MakeRequestAsync( new RawClient.JsonApiRequest