Class: HubSpotSDK::Resources::Settings::Currencies::CentralFxRates
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Settings::Currencies::CentralFxRates
- Defined in:
- lib/hubspot_sdk/resources/settings/currencies/central_fx_rates.rb
Instance Method Summary collapse
-
#create_currency(currency_code:, request_options: {}) ⇒ HubSpotSDK::Models::Settings::ExchangeRate
Some parameter documentations has been truncated, see Models::Settings::Currencies::CentralFxRateCreateCurrencyParams for more details.
-
#get_information(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CentralExchangeRatesInformation
Retrieve details on whether the central exchange rates feature is enabled for the portal.
-
#get_unsupported_currencies(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CollectionResponseCurrencyCodeInfoNoPaging
Retrieve a list of currency codes that are not supported by the central exchange rates.
-
#initialize(client:) ⇒ CentralFxRates
constructor
private
A new instance of CentralFxRates.
Constructor Details
#initialize(client:) ⇒ CentralFxRates
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CentralFxRates.
77 78 79 |
# File 'lib/hubspot_sdk/resources/settings/currencies/central_fx_rates.rb', line 77 def initialize(client:) @client = client end |
Instance Method Details
#create_currency(currency_code:, request_options: {}) ⇒ HubSpotSDK::Models::Settings::ExchangeRate
Some parameter documentations has been truncated, see Models::Settings::Currencies::CentralFxRateCreateCurrencyParams for more details.
Create a new currency with central exchange rates in the portal. Unsupported currencies cannot be added here.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hubspot_sdk/resources/settings/currencies/central_fx_rates.rb', line 24 def create_currency(params) parsed, = HubSpotSDK::Settings::Currencies::CentralFxRateCreateCurrencyParams.dump_request(params) @client.request( method: :post, path: "settings/currencies/2026-03/central-fx-rates/add-currency", body: parsed, model: HubSpotSDK::Settings::ExchangeRate, options: ) end |
#get_information(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CentralExchangeRatesInformation
Retrieve details on whether the central exchange rates feature is enabled for the portal.
46 47 48 49 50 51 52 53 |
# File 'lib/hubspot_sdk/resources/settings/currencies/central_fx_rates.rb', line 46 def get_information(params = {}) @client.request( method: :get, path: "settings/currencies/2026-03/central-fx-rates/information", model: HubSpotSDK::Settings::CentralExchangeRatesInformation, options: params[:request_options] ) end |
#get_unsupported_currencies(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CollectionResponseCurrencyCodeInfoNoPaging
Retrieve a list of currency codes that are not supported by the central exchange rates. Unsupported currencies will need to be manually updated.
65 66 67 68 69 70 71 72 |
# File 'lib/hubspot_sdk/resources/settings/currencies/central_fx_rates.rb', line 65 def get_unsupported_currencies(params = {}) @client.request( method: :get, path: "settings/currencies/2026-03/central-fx-rates/unsupported-currencies", model: HubSpotSDK::Settings::CollectionResponseCurrencyCodeInfoNoPaging, options: params[:request_options] ) end |