Skip to content

Commit 565da34

Browse files
František ZáhoraFrantišek Záhora
authored andcommitted
EN-326 Replace instances of HttpMethod("PATCH") with its corresponding static version.
1 parent 4e4565b commit 565da34

8 files changed

+8
-8
lines changed

Kontent.Ai.Management/ManagementClient.AssetFolder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public async Task<AssetFoldersModel> ModifyAssetFoldersAsync(IEnumerable<AssetFo
3535
ArgumentNullException.ThrowIfNull(changes);
3636

3737
var endpointUrl = _urlBuilder.BuildAssetFoldersUrl();
38-
var response = await _actionInvoker.InvokeMethodAsync<IEnumerable<AssetFolderOperationBaseModel>, AssetFoldersModel>(endpointUrl, new HttpMethod("PATCH"), changes);
38+
var response = await _actionInvoker.InvokeMethodAsync<IEnumerable<AssetFolderOperationBaseModel>, AssetFoldersModel>(endpointUrl, HttpMethod.Patch, changes);
3939

4040
return response;
4141
}

Kontent.Ai.Management/ManagementClient.Collection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public async Task<CollectionsModel> ModifyCollectionAsync(IEnumerable<Collection
2222
ArgumentNullException.ThrowIfNull(changes);
2323

2424
var endpointUrl = _urlBuilder.BuildCollectionsUrl();
25-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CollectionOperationBaseModel>, CollectionsModel>(endpointUrl, new HttpMethod("PATCH"), changes);
25+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CollectionOperationBaseModel>, CollectionsModel>(endpointUrl, HttpMethod.Patch, changes);
2626
}
2727
}

Kontent.Ai.Management/ManagementClient.ContentType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ public async Task<ContentTypeModel> ModifyContentTypeAsync(Reference identifier,
6767
}
6868

6969
var endpointUrl = _urlBuilder.BuildTypeUrl(identifier);
70-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeOperationBaseModel>, ContentTypeModel>(endpointUrl, new HttpMethod("PATCH"), changes);
70+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeOperationBaseModel>, ContentTypeModel>(endpointUrl, HttpMethod.Patch, changes);
7171
}
7272
}

Kontent.Ai.Management/ManagementClient.ContentTypeSnippet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ public async Task<ContentTypeSnippetModel> ModifyContentTypeSnippetAsync(Referen
6767
}
6868

6969
var endpointUrl = _urlBuilder.BuildSnippetsUrl(identifier);
70-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeSnippetOperationBaseModel>, ContentTypeSnippetModel>(endpointUrl, new HttpMethod("PATCH"), changes);
70+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeSnippetOperationBaseModel>, ContentTypeSnippetModel>(endpointUrl, HttpMethod.Patch, changes);
7171
}
7272
}

Kontent.Ai.Management/ManagementClient.CustomApp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ public async Task<CustomAppModel> ModifyCustomAppAsync(Reference identifier, IEn
5757
ArgumentNullException.ThrowIfNull(changes);
5858

5959
var endpointUrl = _urlBuilder.BuildCustomAppUrl(identifier);
60-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CustomAppOperationBaseModel>, CustomAppModel>(endpointUrl, new HttpMethod("PATCH"), changes);
60+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CustomAppOperationBaseModel>, CustomAppModel>(endpointUrl, HttpMethod.Patch, changes);
6161
}
6262
}

Kontent.Ai.Management/ManagementClient.Environment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ public async Task<EnvironmentModel> ModifyEnvironmentAsync(IEnumerable<Environme
4747
ArgumentNullException.ThrowIfNull(changes);
4848

4949
var endpointUrl = _urlBuilder.BuildEnvironmentUrl();
50-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<EnvironmentOperationBaseModel>, EnvironmentModel>(endpointUrl, new HttpMethod("PATCH"), changes);
50+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<EnvironmentOperationBaseModel>, EnvironmentModel>(endpointUrl, HttpMethod.Patch, changes);
5151
}
5252
}

Kontent.Ai.Management/ManagementClient.Language.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ public async Task<LanguageModel> ModifyLanguageAsync(Reference identifier, IEnum
4848
ArgumentNullException.ThrowIfNull(identifier);
4949

5050
var endpointUrl = _urlBuilder.BuildLanguagesUrl(identifier);
51-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<LanguagePatchModel>, LanguageModel>(endpointUrl, new HttpMethod("PATCH"), changes);
51+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<LanguagePatchModel>, LanguageModel>(endpointUrl, HttpMethod.Patch, changes);
5252
}
5353
}

Kontent.Ai.Management/ManagementClient.TaxonomyGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task<TaxonomyGroupModel> ModifyTaxonomyGroupAsync(Reference identif
4848
ArgumentNullException.ThrowIfNull(identifier);
4949

5050
var endpointUrl = _urlBuilder.BuildTaxonomyUrl(identifier);
51-
return await _actionInvoker.InvokeMethodAsync<IEnumerable<TaxonomyGroupOperationBaseModel>, TaxonomyGroupModel>(endpointUrl, new HttpMethod("PATCH"), changes);
51+
return await _actionInvoker.InvokeMethodAsync<IEnumerable<TaxonomyGroupOperationBaseModel>, TaxonomyGroupModel>(endpointUrl, HttpMethod.Patch, changes);
5252
}
5353

5454
/// <inheritdoc />

0 commit comments

Comments
 (0)