Class: HubSpotSDK::Resources::Settings::Currencies
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Settings::Currencies
- Defined in:
- lib/hubspot_sdk/resources/settings/currencies.rb,
lib/hubspot_sdk/resources/settings/currencies/exchange_rates.rb,
lib/hubspot_sdk/resources/settings/currencies/central_fx_rates.rb,
lib/hubspot_sdk/resources/settings/currencies/exchange_rates/batch.rb
Defined Under Namespace
Classes: CentralFxRates, ExchangeRates
Instance Attribute Summary collapse
- #central_fx_rates ⇒ HubSpotSDK::Resources::Settings::Currencies::CentralFxRates readonly
- #exchange_rates ⇒ HubSpotSDK::Resources::Settings::Currencies::ExchangeRates readonly
Instance Method Summary collapse
-
#get_company_currency(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CompanyCurrency
Get the details for the company currency.
-
#initialize(client:) ⇒ Currencies
constructor
private
A new instance of Currencies.
-
#list_codes(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CollectionResponseCurrencyCodeInfoNoPaging
Retrieve a list of all available currency codes and their names.
-
#update_company_currency(currency_code:, request_options: {}) ⇒ HubSpotSDK::Models::Settings::CompanyCurrency
Set or update the primary company currency.
Constructor Details
#initialize(client:) ⇒ Currencies
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 Currencies.
75 76 77 78 79 |
# File 'lib/hubspot_sdk/resources/settings/currencies.rb', line 75 def initialize(client:) @client = client @central_fx_rates = HubSpotSDK::Resources::Settings::Currencies::CentralFxRates.new(client: client) @exchange_rates = HubSpotSDK::Resources::Settings::Currencies::ExchangeRates.new(client: client) end |
Instance Attribute Details
#central_fx_rates ⇒ HubSpotSDK::Resources::Settings::Currencies::CentralFxRates (readonly)
8 9 10 |
# File 'lib/hubspot_sdk/resources/settings/currencies.rb', line 8 def central_fx_rates @central_fx_rates end |
#exchange_rates ⇒ HubSpotSDK::Resources::Settings::Currencies::ExchangeRates (readonly)
11 12 13 |
# File 'lib/hubspot_sdk/resources/settings/currencies.rb', line 11 def exchange_rates @exchange_rates end |
Instance Method Details
#get_company_currency(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CompanyCurrency
Get the details for the company currency. The company currency is used in deal totals, reports, and the default currency for new deals.
23 24 25 26 27 28 29 30 |
# File 'lib/hubspot_sdk/resources/settings/currencies.rb', line 23 def get_company_currency(params = {}) @client.request( method: :get, path: "settings/currencies/2026-03/company-currency", model: HubSpotSDK::Settings::CompanyCurrency, options: params[:request_options] ) end |
#list_codes(request_options: {}) ⇒ HubSpotSDK::Models::Settings::CollectionResponseCurrencyCodeInfoNoPaging
Retrieve a list of all available currency codes and their names.
41 42 43 44 45 46 47 48 |
# File 'lib/hubspot_sdk/resources/settings/currencies.rb', line 41 def list_codes(params = {}) @client.request( method: :get, path: "settings/currencies/2026-03/codes", model: HubSpotSDK::Settings::CollectionResponseCurrencyCodeInfoNoPaging, options: params[:request_options] ) end |
#update_company_currency(currency_code:, request_options: {}) ⇒ HubSpotSDK::Models::Settings::CompanyCurrency
Set or update the primary company currency.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/hubspot_sdk/resources/settings/currencies.rb', line 61 def update_company_currency(params) parsed, = HubSpotSDK::Settings::CurrencyUpdateCompanyCurrencyParams.dump_request(params) @client.request( method: :put, path: "settings/currencies/2026-03/company-currency", body: parsed, model: HubSpotSDK::Settings::CompanyCurrency, options: ) end |