Skip to content

Simplify writing a model from a JSON file #131

@aaguiarz

Description

@aaguiarz

Checklist

Describe the problem you'd like to have solved

I want to write

client.WriteAuthorizationModel(WriteAuthorizationModelRequest.FromJson(modelJson);

It's not possible because WriteAuthorizationModel receives a ClientWriteAuthorizationModelRequest.

Describe the ideal solution

Given ClientWriteAuthorizationModelRequest just inherits from WriteAuthorizationModelRequest, we could redefine the client WriteAuthorizationModel method to:

public async Task<WriteAuthorizationModelResponse> WriteAuthorizationModel(WriteAuthorizationModelRequest body, IClientRequestOptionsWithStoreId? options = null, CancellationToken cancellationToken = default(CancellationToken))
    {
        return await api.WriteAuthorizationModel(GetStoreId(options), body, cancellationToken);
    }

Alternatives and current workarounds

No response

References

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Intake

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions