Click or drag to resize

ESDocumentCurrencyExchangeRate Class

Ecommerce standards document that holds a list of currency exchange rate records
Inheritance Hierarchy
SystemObject
  EcommerceStandardsDocumentsESDocument
    EcommerceStandardsDocumentsESDocumentCurrencyExchangeRate

Namespace:  EcommerceStandardsDocuments
Assembly:  EcommerceStandardsDocuments.Library (in EcommerceStandardsDocuments.Library.dll) Version: 1.3.0.0 (1.0.0.0)

The ESDocumentCurrencyExchangeRate type exposes the following members.

Constructors
  NameDescription
Public methodESDocumentCurrencyExchangeRate
Constructor
Top
Fields
  NameDescription
Public fieldconfigs
A dictionary of additional configurations and settings to include with each Ecommerce Standard Document. Typically documents would contain the "dataFields" key that would have a comma delimited list of record properties that are expected to contain data when reading the document's records. Any records not containing data for properties in list could then have the data set to a default when saved to a database.
(Inherited from ESDocument.)
Public fielddataRecords
List of currency exchange rate records
Public fielddataTransferMode
Denotes if the data being placed into document is a complete data set, or partial data being transferred containing only data changes.
(Inherited from ESDocument.)
Public fieldmessage
Message providing details of if the data could be obtained when requesting the document. The message gives meaning to the result status.
(Inherited from ESDocument.)
Public fieldresultStatus
Code that denotes if the data could be successfully obtained for the document, and if not why. See ESDocumentConstants Class for the list of status codes
(Inherited from ESDocument.)
Public fieldtotalDataRecords
The total number of records placed within document. For documents that contain multiple record lists, please check the relevant documentation to see how this number applies.
(Inherited from ESDocument.)
Public fieldversion
Version of the Ecommerce Standards Document. Verifying the version of the document is critical for systems transferring and manipulating the data.
(Inherited from ESDocument.)
Top
Examples
An example of the currency exchange rate Ecommerce Standards document in its JSON serialised form
{
    "version": 1.3,
    "resultStatus": 1,
    "message":"The currency exchange rate data has been successfully obtained.",
    "dataTransferMode": "COMPLETE",
    "totalDataRecords": 5,
    "configs":{"dataFields":"keyCurrencyExchangeRateID,sellCurrencyCode,sellCurrencyName,sellCurrencyType,buyCurrencyCode,buyCurrencyName,buyCurrencyType,exchangeRate"},
    "dataRecords":
     [
        {
            "keyCurrencyExchangeRateID":"1"
        },
        //exchange rate from Australian Dollars to US dollars, $1 AUD sells for $0.70 USD
        {
            "keyCurrencyExchangeRateID":"2",
            "sellCurrencyCode":"AUD",
            "sellCurrencyName":"Australian Dollars",
            "sellCurrencyType":"FIAT",
            "buyCurrencyCode":"USD",
            "buyCurrencyName":"United States Dollars",
            "buyCurrencyType":"FIAT",
            "exchangeRate": 0.7000
        },
        //exchange rate USD to AUD, $1 USD sells for $1.30 AUD
        {
            "keyCurrencyExchangeRateID":"3",
            "sellCurrencyCode":"USD",
            "sellCurrencyName":"United States Dollars",
            "sellCurrencyType":"FIAT",
            "buyCurrencyCode":"AUD",
            "buyCurrencyName":"Australian Dollars",
            "buyCurrencyType":"FIAT",
            "exchangeRate": 1.3000
        },
        //exchange rate USD to EUR, $1 USD sells for €0.7727 EUR
        {
            "keyCurrencyExchangeRateID":"4AB",
            "sellCurrencyCode":"USD",
            "sellCurrencyName":"United States Dollars",
            "sellCurrencyType":"FIAT",
            "buyCurrencyCode":"EUR",
            "buyCurrencyName":"Euros",
            "buyCurrencyType":"FIAT",
            "exchangeRate": 0.7727
        },
        //exchange rate Bitcoin to US Dollars, 1 Bitcoin sells for $8023.60 US Dollars
        {
            "keyCurrencyExchangeRateID":"5CC",
            "sellCurrencyCode":"BTC",
            "sellCurrencyName":"Bitcoins",
            "sellCurrencyType":"CRYPTO",
            "buyCurrencyCode":"USD",
            "buyCurrencyName":"United States Dollars",
            "buyCurrencyType":"FIAT",
            "exchangeRate": 8023.6000
        }
    ]
}
See Also