Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 4.28 KB

CustomExchangeRatesApi.md

File metadata and controls

63 lines (44 loc) · 4.28 KB

zuora_client.CustomExchangeRatesApi

All URIs are relative to https://rest.zuora.com

Method HTTP request Description
g_et_custom_exchange_rates GET /v1/custom-exchange-rates/{currency} Get custom foreign currency exchange rates

g_et_custom_exchange_rates

GETCustomExchangeRatesType g_et_custom_exchange_rates(currency, start_date, end_date, zuora_entity_ids=zuora_entity_ids)

Get custom foreign currency exchange rates

This feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. This reference describes how to query custom foreign exchange rates from Zuora. You can use this API method to query exchange rates only if you use a custom exchange rate provider and upload rates with the Import Foreign Exchange Rates mass action.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CustomExchangeRatesApi()
currency = 'currency_example' # str | The target base currency of the tenant. The exchange rates in the response are calculated in relation to the target currency.  The value must be a three-letter currency code, for example, USD.  
start_date = 'start_date_example' # str | Start date of the date range for which you want to get exchange rates.  The date must be in yyyy-mm-dd format, for example, 2016-01-15. The start date cannot be later than the end date. 
end_date = 'end_date_example' # str | End date of the date range for which you want to get exchange rates.  The date must be in yyyy-mm-dd format, for example, 2016-01-16. The end date can be a maximum of 90 days after the start date. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Get custom foreign currency exchange rates
    api_response = api_instance.g_et_custom_exchange_rates(currency, start_date, end_date, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomExchangeRatesApi->g_et_custom_exchange_rates: %s\n" % e)

Parameters

Name Type Description Notes
currency str The target base currency of the tenant. The exchange rates in the response are calculated in relation to the target currency. The value must be a three-letter currency code, for example, USD.
start_date str Start date of the date range for which you want to get exchange rates. The date must be in yyyy-mm-dd format, for example, 2016-01-15. The start date cannot be later than the end date.
end_date str End date of the date range for which you want to get exchange rates. The date must be in yyyy-mm-dd format, for example, 2016-01-16. The end date can be a maximum of 90 days after the start date.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCustomExchangeRatesType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]