Table of Contents

Class FinancialDataResponse<T>

Namespace
Tudormobile.FinancialData
Assembly
Tudormobile.FinancialData.dll

Represents the response from a financial data API call.

public class FinancialDataResponse<T>

Type Parameters

T

The type of data returned by the API call.

Inheritance
FinancialDataResponse<T>
Inherited Members

Constructors

FinancialDataResponse(T?, string?)

Creates and initializes a new instance of the FinancialDataResponse<T> class with the specified data and error message.

public FinancialDataResponse(T? data = default, string? error = null)

Parameters

data T

The data associated with the response, or null if no data is available.

error string

The error message associated with the current instance, if any.

Properties

Data

Gets the data associated with the response, or null if no data is available.

public T? Data { get; }

Property Value

T

Error

Gets the error message associated with the current instance, if any.

public string? Error { get; }

Property Value

string

Remarks

This property returns a string that provides details about the error that occurred. It will be null if no error has been recorded.

IsSuccess

Gets a value indicating whether the operation completed successfully.

public bool IsSuccess { get; }

Property Value

bool

Remarks

The property returns true if the response contains data; otherwise, it returns false. Use this property to determine whether the operation produced a valid result before accessing the data.

Methods

PremiumSubscriptionNotImplemented()

Returns a task that represents an asynchronous operation indicating that the premium subscription API is not implemented.

public static Task<FinancialDataResponse<T>> PremiumSubscriptionNotImplemented()

Returns

Task<FinancialDataResponse<T>>

A task containing a FinancialDataResponse<T> object with an error message stating that the premium subscription API is not implemented.

StandardSubscriptionNotImplemented()

Returns a task that represents the asynchronous operation of retrieving financial data, indicating that the standard subscription API is not implemented.

public static Task<FinancialDataResponse<T>> StandardSubscriptionNotImplemented()

Returns

Task<FinancialDataResponse<T>>

A task containing a FinancialDataResponse<T> object with an error message stating that the standard subscription API is not implemented.