Class: HubSpotSDK::Resources::Settings::TaxRates

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/settings/tax_rates.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ TaxRates

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 TaxRates.

Parameters:



61
62
63
# File 'lib/hubspot_sdk/resources/settings/tax_rates.rb', line 61

def initialize(client:)
  @client = client
end

Instance Method Details

#get(tax_rate_group_id, request_options: {}) ⇒ HubSpotSDK::Models::Settings::PublicTaxRateGroup

Retrieve a specific tax rate by its ‘taxRateGroupId`.

Parameters:

Returns:

See Also:



49
50
51
52
53
54
55
56
# File 'lib/hubspot_sdk/resources/settings/tax_rates.rb', line 49

def get(tax_rate_group_id, params = {})
  @client.request(
    method: :get,
    path: ["tax-rates/2026-03/tax-rates/%1$s", tax_rate_group_id],
    model: HubSpotSDK::Settings::PublicTaxRateGroup,
    options: params[:request_options]
  )
end

#list(active: nil, after: nil, limit: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Settings::PublicTaxRateGroup>

Some parameter documentations has been truncated, see Models::Settings::TaxRateListParams for more details.

Retrieve a paginated list of all tax rates set up in the account tax rate library

Parameters:

  • active (Boolean)
  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • limit (Integer)

    The maximum number of results to display per page.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/hubspot_sdk/resources/settings/tax_rates.rb', line 26

def list(params = {})
  parsed, options = HubSpotSDK::Settings::TaxRateListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "tax-rates/2026-03/tax-rates",
    query: query,
    page: HubSpotSDK::Internal::Page,
    model: HubSpotSDK::Settings::PublicTaxRateGroup,
    options: options
  )
end