Class SubscriptionUsersClient
Inheritance
Implements
Namespace: FastReport.Cloud.Client
Assembly: FastReport.Cloud.SDK.dll
Syntax
public class SubscriptionUsersClient : object, ISubscriptionUsersClient
Constructors
SubscriptionUsersClient(System.Net.Http.HttpClient)
Declaration
public SubscriptionUsersClient(System.Net.Http.HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpClient | httpClient |
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializerSettings |
PrepareRequestCallback
Declaration
public Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, string> PrepareRequestCallback { get; set; }
Property Value
Type | Description |
---|---|
Action<System.Net.Http.HttpClient, System.Net.Http.HttpRequestMessage, System.String> |
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddUser(String, String)
Add a user to the subscription,
the added users will be displayed in the list of users of the subscription,
and these users will also have an active subscription.
Declaration
public virtual void AddUser(string subscriptionId, string userId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.String | userId | Idenitifier of user |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
AddUserAsync(String, String, System.Threading.CancellationToken)
Add a user to the subscription,
the added users will be displayed in the list of users of the subscription,
and these users will also have an active subscription.
Declaration
public virtual async System.Threading.Tasks.Task AddUserAsync(string subscriptionId, string userId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.String | userId | Idenitifier of user |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Succesfully added |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CountUsers(String)
Returns a number of users in subscription
Declaration
public virtual long CountUsers(string subscriptionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId |
Returns
Type | Description |
---|---|
System.Int64 | Succesfully returned |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CountUsersAsync(String, System.Threading.CancellationToken)
Returns a number of users in subscription
Declaration
public virtual async System.Threading.Tasks.Task<long> CountUsersAsync(string subscriptionId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int64> | Succesfully returned |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetUsers(String, Nullable<Int32>, Nullable<Int32>)
Returns all users of subscription
Declaration
public virtual SubscriptionUsersVM GetUsers(string subscriptionId, int? skip = null, int? take = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.Nullable<System.Int32> | skip | How many entities skip |
System.Nullable<System.Int32> | take | How many entities take |
Returns
Type | Description |
---|---|
SubscriptionUsersVM | Succesfully returned |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetUsersAsync(String, Nullable<Int32>, Nullable<Int32>, System.Threading.CancellationToken)
Returns all users of subscription
Declaration
public virtual async System.Threading.Tasks.Task<SubscriptionUsersVM> GetUsersAsync(string subscriptionId, int? skip = null, int? take = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.Nullable<System.Int32> | skip | How many entities skip |
System.Nullable<System.Int32> | take | How many entities take |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SubscriptionUsersVM> | Succesfully returned |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
LeaveSubscripiton(String)
Allows user to leave subscription,.
Declaration
public virtual void LeaveSubscripiton(string subscriptionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
LeaveSubscripitonAsync(String, System.Threading.CancellationToken)
Allows user to leave subscription,.
Declaration
public virtual async System.Threading.Tasks.Task LeaveSubscripitonAsync(string subscriptionId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Succesfully deleted |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage, System.Collections.Generic.IReadOnlyDictionary<String, System.Collections.Generic.IEnumerable<String>>, System.Threading.CancellationToken)
Declaration
protected virtual async System.Threading.Tasks.Task<SubscriptionUsersClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpResponseMessage | response | |
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>> | headers | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SubscriptionUsersClient.ObjectResponseResult<T>> |
Type Parameters
Name | Description |
---|---|
T |
RemoveUser(String, String)
Delete a user from the subscription,
the added users will be displayed in the list of users of the subscription,
and these users will also have an active subscription.
Declaration
public virtual void RemoveUser(string subscriptionId, string userId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.String | userId | Idenitifier of user |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
RemoveUserAsync(String, String, System.Threading.CancellationToken)
Delete a user from the subscription,
the added users will be displayed in the list of users of the subscription,
and these users will also have an active subscription.
Declaration
public virtual async System.Threading.Tasks.Task RemoveUserAsync(string subscriptionId, string userId, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionId | Idenitifier of subscription |
System.String | userId | Idenitifier of user |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Succesfully deleted |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |