C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
ExchangeRateTable.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Runtime.Serialization;
5
8
10{
13 {
14 #region APIResource Interface Members
16 public static readonly string CLASS_COLLECTION_NAME = "exchange_rate_tables";
19 public override string collection_name => CLASS_COLLECTION_NAME;
20
28 [Obsolete("Progress % is not reported on the root object, but at the /data/status/ endpoint.")]
29 public double progress { get; set; }
30 #endregion APIResource Interface Members
31
32 #region Public Properties
34 [DataMember(Order = 11)]
35 [NotNull]
36 [NotEmpty]
37 public string base_currency { get; set; }
38
43 new SubResource<CurrenciesEndpointResponse>(this, "currencies");
44
48 new HashSet<string>(currencies.Get()?.currencies?.Select(c => c.code) ?? new string[] { });
49 #endregion Public Properties
50
51 #region Nested Classes
55 {
57 [DataMember(Order = 1)]
60
64 {
66 [DataMember(Order = 1)]
68 public string code { get; set; }
69 }
70 }
71 #endregion Nested Classes
72 }
73}
Base class used by all types and resources.
Definition APIType.cs:8
Minor extension to the base APIResource class that adds a "/data" sub-resource, since this is common ...
Describes a collection of resources which can be listed.
Specifies that a property is generated by the server and should not be specified on the client side d...
The information provided by the server about each currency. Currently only the currency "code" is ret...
string code
The currency code as it appears in the exchange rate table data.
An object representation of the ExchangeRateTable.currencies endpoint response.
List< CurrencyInformation > currencies
The list of CurrencyInformation objects provided in the response.
A table containing exchange rate information.
static readonly string CLASS_COLLECTION_NAME
The collection endpoint at which resources of this type reside on the server.
HashSet< string > GetUniqueCurrencies()
Uses the currencies endpoint to return a list of unique currencies present in the exchange rate table...
SubResource< CurrenciesEndpointResponse > currencies
An endpoint from which the user can retrieve information about the unique currencies in this exchange...
double progress
Obsolete - Maintained for backwards-compatibility purposes. This was meant to display the progress in...
string base_currency
The currency that all exchange rates in the table convert to.
override string collection_name
The collection endpoint at which resources of this type reside on the server.