public LanguageVariantUpsertModel GetLanguageVariantUpsertModel <T>(T variantElements, WorkflowStepIdentifier workflow = null) where T : new() =>
/// <inheritdoc /> public async Task <LanguageVariantModel <T> > UpsertLanguageVariantAsync <T>(LanguageVariantIdentifier identifier, T variantElements, WorkflowStepIdentifier workflow = null) where T : new() { if (identifier == null) { throw new ArgumentNullException(nameof(identifier)); } if (variantElements == null) { throw new ArgumentNullException(nameof(variantElements)); } var endpointUrl = _urlBuilder.BuildVariantsUrl(identifier); var variantUpsertModel = _modelProvider.GetLanguageVariantUpsertModel(variantElements, workflow); var response = await _actionInvoker.InvokeMethodAsync <LanguageVariantUpsertModel, LanguageVariantModel>(endpointUrl, HttpMethod.Put, variantUpsertModel); return(_modelProvider.GetLanguageVariantModel <T>(response)); }
/// <inheritdoc /> public async Task ChangeLanguageVariantWorkflowAsync(LanguageVariantIdentifier identifier, WorkflowStepIdentifier workflowStepIdentifier) { if (identifier == null) { throw new ArgumentNullException(nameof(identifier)); } if (workflowStepIdentifier == null) { throw new ArgumentNullException(nameof(workflowStepIdentifier)); } var endpointUrl = _urlBuilder.BuildWorkflowChangeUrl(identifier); await _actionInvoker.InvokeMethodAsync(endpointUrl, HttpMethod.Put, workflowStepIdentifier); }
internal LanguageVariantUpsertModel(LanguageVariantModel languageVariant) { Elements = languageVariant.Elements; Workflow = languageVariant.Workflow; }