From 78f75969797a9b989de55bb7f34f4d4705e6c8b7 Mon Sep 17 00:00:00 2001 From: Shubham Date: Wed, 25 Sep 2024 10:47:12 +0530 Subject: [PATCH] chore: add json request body in fetch, delete and read operations (#615) --- .../src/Twilio/Rest/Api/V2010/Account/CallOptions.cs | 4 ++-- .../csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs | 6 +++--- .../Rest/FlexApi/V1/Credential/Aws/HistoryOptions.cs | 2 +- .../src/Twilio/Rest/FlexApi/V1/Credential/AwsOptions.cs | 6 +++--- .../Twilio/Rest/PreviewIam/Organizations/UserOptions.cs | 6 +++--- .../Rest/Versionless/DeployedDevices/FleetOptions.cs | 2 +- .../Twilio/Rest/Versionless/Understand/AssistantOptions.cs | 2 +- .../resources/twilio-csharp/options/DeleteOptions.mustache | 7 ++++++- .../resources/twilio-csharp/options/FetchOptions.mustache | 7 ++++++- .../resources/twilio-csharp/options/ReadOptions.mustache | 7 ++++++- 10 files changed, 32 insertions(+), 17 deletions(-) diff --git a/examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs b/examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs index fca20f911..473d9ab82 100644 --- a/examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs +++ b/examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs @@ -111,7 +111,7 @@ public List> GetParams() return p; } - + } @@ -144,7 +144,7 @@ public List> GetParams() return p; } - + } diff --git a/examples/csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs b/examples/csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs index 6d2963c77..5c85f5db3 100644 --- a/examples/csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs +++ b/examples/csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs @@ -95,7 +95,7 @@ public List> GetParams() return p; } - + } @@ -119,7 +119,7 @@ public List> GetParams() return p; } - + } @@ -175,7 +175,7 @@ public List> GetParams() return p; } - + } diff --git a/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/Aws/HistoryOptions.cs b/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/Aws/HistoryOptions.cs index 0b33c73be..31be31a30 100644 --- a/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/Aws/HistoryOptions.cs +++ b/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/Aws/HistoryOptions.cs @@ -55,7 +55,7 @@ public List> GetParams() return p; } - + } diff --git a/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/AwsOptions.cs b/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/AwsOptions.cs index a27e619fb..697fce3f1 100644 --- a/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/AwsOptions.cs +++ b/examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/AwsOptions.cs @@ -48,7 +48,7 @@ public List> GetParams() return p; } - + } @@ -78,7 +78,7 @@ public List> GetParams() return p; } - + } @@ -103,7 +103,7 @@ public List> GetParams() return p; } - + } diff --git a/examples/csharp/src/Twilio/Rest/PreviewIam/Organizations/UserOptions.cs b/examples/csharp/src/Twilio/Rest/PreviewIam/Organizations/UserOptions.cs index e0e20bc05..745105eac 100644 --- a/examples/csharp/src/Twilio/Rest/PreviewIam/Organizations/UserOptions.cs +++ b/examples/csharp/src/Twilio/Rest/PreviewIam/Organizations/UserOptions.cs @@ -89,7 +89,7 @@ public List> GetParams() return p; } - + } @@ -124,7 +124,7 @@ public List> GetParams() return p; } - + } @@ -161,7 +161,7 @@ public List> GetParams() return p; } - + } diff --git a/examples/csharp/src/Twilio/Rest/Versionless/DeployedDevices/FleetOptions.cs b/examples/csharp/src/Twilio/Rest/Versionless/DeployedDevices/FleetOptions.cs index eef805032..9e36d9918 100644 --- a/examples/csharp/src/Twilio/Rest/Versionless/DeployedDevices/FleetOptions.cs +++ b/examples/csharp/src/Twilio/Rest/Versionless/DeployedDevices/FleetOptions.cs @@ -74,7 +74,7 @@ public List> GetParams() return p; } - + } diff --git a/examples/csharp/src/Twilio/Rest/Versionless/Understand/AssistantOptions.cs b/examples/csharp/src/Twilio/Rest/Versionless/Understand/AssistantOptions.cs index 24fc66b24..8bf3b6191 100644 --- a/examples/csharp/src/Twilio/Rest/Versionless/Understand/AssistantOptions.cs +++ b/examples/csharp/src/Twilio/Rest/Versionless/Understand/AssistantOptions.cs @@ -43,7 +43,7 @@ public List> GetParams() return p; } - + } diff --git a/src/main/resources/twilio-csharp/options/DeleteOptions.mustache b/src/main/resources/twilio-csharp/options/DeleteOptions.mustache index aaa354d5a..81a89826d 100644 --- a/src/main/resources/twilio-csharp/options/DeleteOptions.mustache +++ b/src/main/resources/twilio-csharp/options/DeleteOptions.mustache @@ -19,7 +19,12 @@ } {{/vendorExtensions.x-required-param-exists}} + {{^vendorExtensions.x-is-json}} {{>options/GetParams}} - {{>options/HeaderParams}} + {{/vendorExtensions.x-is-json}} + {{#vendorExtensions.x-is-json}} + {{>options/GetBody}} + {{/vendorExtensions.x-is-json}} + {{>options/HeaderParams}} } diff --git a/src/main/resources/twilio-csharp/options/FetchOptions.mustache b/src/main/resources/twilio-csharp/options/FetchOptions.mustache index 93c379acf..3f37646c3 100644 --- a/src/main/resources/twilio-csharp/options/FetchOptions.mustache +++ b/src/main/resources/twilio-csharp/options/FetchOptions.mustache @@ -19,7 +19,12 @@ } {{/vendorExtensions.x-required-param-exists}} + {{^vendorExtensions.x-is-json}} {{>options/GetParams}} - {{>options/HeaderParams}} + {{/vendorExtensions.x-is-json}} + {{#vendorExtensions.x-is-json}} + {{>options/GetBody}} + {{/vendorExtensions.x-is-json}} + {{>options/HeaderParams}} } diff --git a/src/main/resources/twilio-csharp/options/ReadOptions.mustache b/src/main/resources/twilio-csharp/options/ReadOptions.mustache index 1689686a0..e77a9f95e 100644 --- a/src/main/resources/twilio-csharp/options/ReadOptions.mustache +++ b/src/main/resources/twilio-csharp/options/ReadOptions.mustache @@ -19,6 +19,11 @@ } {{/vendorExtensions.x-required-param-exists}} + {{^vendorExtensions.x-is-json}} {{>options/GetParams}} - {{>options/HeaderParams}} + {{/vendorExtensions.x-is-json}} + {{#vendorExtensions.x-is-json}} + {{>options/GetBody}} + {{/vendorExtensions.x-is-json}} + {{>options/HeaderParams}} }