Class SubscriptionPlansClient
Inheritance
Implements
Namespace: FastReport.Cloud.Client
Assembly: FastReport.Cloud.SDK.dll
Syntax
public class SubscriptionPlansClient : object, ISubscriptionPlansClient
Constructors
SubscriptionPlansClient(System.Net.Http.HttpClient)
Declaration
public SubscriptionPlansClient(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
GetSubscriptionPlan(String)
Returns a subscription plan. Not all subscriptions can be issued for customer.
Declaration
public virtual SubscriptionPlanVM GetSubscriptionPlan(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of subsctiption plan |
Returns
Type | Description |
---|---|
SubscriptionPlanVM | Succesfully returned |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetSubscriptionPlanAsync(String, System.Threading.CancellationToken)
Returns a subscription plan. Not all subscriptions can be issued for customer.
Declaration
public virtual async System.Threading.Tasks.Task<SubscriptionPlanVM> GetSubscriptionPlanAsync(string id, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of subsctiption plan |
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<SubscriptionPlanVM> | Succesfully returned |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetSubscriptionPlans(Nullable<Int32>, Nullable<Int32>)
Returns a list of active subscription plans that can be issued to the user.
Declaration
public virtual SubscriptionPlansVM GetSubscriptionPlans(int? skip = null, int? take = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | skip | Variable for pagination, defautl value is 0 |
System.Nullable<System.Int32> | take | Variable for pagination, default value is 10 |
Returns
Type | Description |
---|---|
SubscriptionPlansVM | Succesfully returned |
Remarks
If no active subscription plans, then the endpoint will return empty list
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
GetSubscriptionPlansAsync(Nullable<Int32>, Nullable<Int32>, System.Threading.CancellationToken)
Returns a list of active subscription plans that can be issued to the user.
Declaration
public virtual async System.Threading.Tasks.Task<SubscriptionPlansVM> GetSubscriptionPlansAsync(int? skip = null, int? take = null, System.Threading.CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | skip | Variable for pagination, defautl value is 0 |
System.Nullable<System.Int32> | take | Variable for pagination, default value is 10 |
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<SubscriptionPlansVM> | Succesfully returned |
Remarks
If no active subscription plans, then the endpoint will return empty list
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<SubscriptionPlansClient.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<SubscriptionPlansClient.ObjectResponseResult<T>> |
Type Parameters
Name | Description |
---|---|
T |