Currency Examples

Query All Currencies

Query for all currencies.

[
  {
    "Action": "Query",
    "QueryType": "CurrencyAll",
    "DomainType": "Replicon.Domain.Currency",
    "Args": []
  }
]

Query All Currencies by Id

Query for all currencies by Id.

[
  {
    "Action": "Query",
    "QueryType": "CurrencyById",
    "DomainType": "Replicon.Domain.Currency",
    "Args": [
      [
        2
      ]
    ]
  }
]

Query All Currencies by Symbol

Query for all currencies by symbol.

[
  {
    "Action": "Query",
    "QueryType": "CurrencyBySymbol",
    "DomainType": "Replicon.Domain.Currency",
    "Args": [
      "CDN $"
    ]
  }
]

Query System base currency

Query for System base currency.

[
  {
    "Action": "Query",
    "QueryType": "BaseCurrency",
    "DomainType": "Replicon.Domain.Currency",
    "Args": []
  }
]

Create Currency with Exchange Rate

Create a currency with a pair of exchange rates

[
  {
    "Action": "Create",
    "Type": "Replicon.Domain.Currency",
    "Operations": [
      {
        "__operation": "SetProperties",
        "Name": "Moon Dollars",
        "Symbol": "M$"
      },
      {
        "__operation": "AddExchangeRate",
        "EndDate": {
          "__type": "Date",
          "Year": 2010,
          "Month": 10,
          "Day": 10
        },
        "EffectiveDate": {
          "__type": "Date",
          "Year": 2010,
          "Month": 10,
          "Day": 1
        },
        "ExchangeValue": 10
      },
      {
        "__operation": "AddExchangeRate",
        "EndDate": {
          "__type": "Date",
          "Future": true
        },
        "EffectiveDate": {
          "__type": "Date",
          "Year": 2010,
          "Month": 10,
          "Day": 2
        },
        "ExchangeValue": 12
      }
    ]
  }
]