Class: HubSpotSDK::Resources::Crm::AssociationsSchema::Limits

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/crm/associations_schema/limits.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Limits

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

Parameters:



131
132
133
# File 'lib/hubspot_sdk/resources/crm/associations_schema/limits.rb', line 131

def initialize(client:)
  @client = client
end

Instance Method Details

#batch_delete(to_object_type, from_object_type:, inputs:, request_options: {}) ⇒ nil

Batch delete limits that have been defined for association types between two object types.

Parameters:

Returns:

  • (nil)

See Also:



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/hubspot_sdk/resources/crm/associations_schema/limits.rb', line 43

def batch_delete(to_object_type, params)
  parsed, options = HubSpotSDK::Crm::AssociationsSchema::LimitBatchDeleteParams.dump_request(params)
  from_object_type =
    parsed.delete(:from_object_type) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: [
      "crm/associations/2026-03/definitions/configurations/%1$s/%2$s/batch/purge",
      from_object_type,
      to_object_type
    ],
    body: parsed,
    model: NilClass,
    options: options
  )
end

#batch_update(to_object_type, from_object_type:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponsePublicAssociationDefinitionConfigurationUpdateResult

Batch update association limits that have been configured between two object types.

Parameters:

Returns:

See Also:



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/hubspot_sdk/resources/crm/associations_schema/limits.rb', line 78

def batch_update(to_object_type, params)
  parsed, options = HubSpotSDK::Crm::AssociationsSchema::LimitBatchUpdateParams.dump_request(params)
  from_object_type =
    parsed.delete(:from_object_type) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: [
      "crm/associations/2026-03/definitions/configurations/%1$s/%2$s/batch/update",
      from_object_type,
      to_object_type
    ],
    body: parsed,
    model: HubSpotSDK::Crm::BatchResponsePublicAssociationDefinitionConfigurationUpdateResult,
    options: options
  )
end

#get_by_object_types(to_object_type, from_object_type:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponsePublicAssociationDefinitionUserConfigurationNoPaging

Retrieve the configuration details for associations between two specified CRM object types. Use this endpoint to understand limits that have been set for specific association types.

Parameters:

Returns:

See Also:



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/hubspot_sdk/resources/crm/associations_schema/limits.rb', line 110

def get_by_object_types(to_object_type, params)
  parsed, options = HubSpotSDK::Crm::AssociationsSchema::LimitGetByObjectTypesParams.dump_request(params)
  from_object_type =
    parsed.delete(:from_object_type) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: [
      "crm/associations/2026-03/definitions/configurations/%1$s/%2$s",
      from_object_type,
      to_object_type
    ],
    model: HubSpotSDK::Crm::CollectionResponsePublicAssociationDefinitionUserConfigurationNoPaging,
    options: options
  )
end

#list(request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponsePublicAssociationDefinitionUserConfigurationNoPaging

Retrieve all configured association limits between objects, which include details about how different CRM object types are associated with each other.



18
19
20
21
22
23
24
25
# File 'lib/hubspot_sdk/resources/crm/associations_schema/limits.rb', line 18

def list(params = {})
  @client.request(
    method: :get,
    path: "crm/associations/2026-03/definitions/configurations/all",
    model: HubSpotSDK::Crm::CollectionResponsePublicAssociationDefinitionUserConfigurationNoPaging,
    options: params[:request_options]
  )
end