ExchangeRate

An ExchangeRate is a resource defining the exchange rate of currencies. This resource can set a custom exchange rate for a specific domain, separately from the exchange rate of the default domain set in config.

Package : spaceone.api.cost_analysis.v1

ExchangeRate

ExchangeRate Methods:

set

Overrides a value of a specific ExchangeRate. This method is used to change the ExchangeRate in a specific domain. You can set the currency and rate of the resource.

POST /cost-analysis/v1/exchange-rate/set

{{< tabs " set " >}}

{{< tab "Request Example" >}}

SetExchangeRateRequest

  • currency (string) Required

  • rate (float) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW", "rate": 1300 } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ExchangeRateInfo

  • currency (string) Required

  • rate (float) Required

  • state (State) Required

  • is_default (bool) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

reset

Resets a value of a specific ExchangeRate and changes the ExchangeRate to the ExchangeRate of the default domain.

POST /cost-analysis/v1/exchange-rate/reset

{{< tabs " reset " >}}

{{< tab "Request Example" >}}

ExchangeRateRequest

  • currency (string) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ExchangeRateInfo

  • currency (string) Required

  • rate (float) Required

  • state (State) Required

  • is_default (bool) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

enable

POST /cost-analysis/v1/exchange-rate/enable

{{< tabs " enable " >}}

{{< tab "Request Example" >}}

ExchangeRateRequest

  • currency (string) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ExchangeRateInfo

  • currency (string) Required

  • rate (float) Required

  • state (State) Required

  • is_default (bool) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

disable

POST /cost-analysis/v1/exchange-rate/disable

{{< tabs " disable " >}}

{{< tab "Request Example" >}}

ExchangeRateRequest

  • currency (string) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ExchangeRateInfo

  • currency (string) Required

  • rate (float) Required

  • state (State) Required

  • is_default (bool) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

get

Gets a specific ExchangeRate. Prints detailed information about the ExchangeRate, including currency and rate.

POST /cost-analysis/v1/exchange-rate/get

{{< tabs " get " >}}

{{< tab "Request Example" >}}

ExchangeRateRequest

  • currency (string) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ExchangeRateInfo

  • currency (string) Required

  • rate (float) Required

  • state (State) Required

  • is_default (bool) Required

  • domain_id (string) Required

{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

list

Gets a list of all ExchangeRates. You can use a query to get a filtered list of ExchangeRates.

POST /cost-analysis/v1/exchange-rate/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

ExchangeRateQuery

  • domain_id (string) Required

{{< highlight json >}} {

} {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ExchangeRatesInfo

  • results (ExchangeRateInfo) Repeated Required

  • total_count (int32) Required

{{< highlight json >}} { "results": [ { "currency": "JPY", "rate": 129.8, "state": "ENABLED", "is_default": true, "domain_id": "domain-58010aa2e451" }, { "currency": "KRW", "rate": 1242.7, "state": "ENABLED", "is_default": true, "domain_id": "domain-58010aa2e451" } ], "total_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

Message

ExchangeRateInfo

  • currency (string) Required

  • rate (float) Required

  • state (State) Required

  • is_default (bool) Required

  • domain_id (string) Required

ExchangeRateQuery

  • domain_id (string) Required

ExchangeRateRequest

  • currency (string) Required

  • domain_id (string) Required

ExchangeRatesInfo

  • results (ExchangeRateInfo) Repeated Required

  • total_count (int32) Required

SetExchangeRateRequest

  • currency (string) Required

  • rate (float) Required

  • domain_id (string) Required

Last updated