Class: HubSpotSDK::Resources::Crm::AssociationsSchema::Labels
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::AssociationsSchema::Labels
- Defined in:
- lib/hubspot_sdk/resources/crm/associations_schema/labels.rb
Instance Method Summary collapse
-
#batch_create(to_object_type, from_object_type:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponsePublicAssociationDefinitionUserConfiguration
Batch configure association limits between two object types.
-
#create_label(to_object_type, from_object_type:, label:, name:, inverse_label: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponseAssociationSpecWithLabelNoPaging
Some parameter documentations has been truncated, see Models::Crm::AssociationsSchema::LabelCreateLabelParams for more details.
-
#delete_label(association_type_id, from_object_type:, to_object_type:, request_options: {}) ⇒ nil
Remove a specific label from the association between two CRM object types.
-
#initialize(client:) ⇒ Labels
constructor
private
A new instance of Labels.
-
#list_labels(to_object_type, from_object_type:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponseAssociationSpecWithLabelNoPaging
Retrieve all labels that describe the relationships between two specified CRM object types.
-
#update_label(to_object_type, from_object_type:, association_type_id:, label:, inverse_label: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Crm::AssociationsSchema::LabelUpdateLabelParams for more details.
Constructor Details
#initialize(client:) ⇒ Labels
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 Labels.
186 187 188 |
# File 'lib/hubspot_sdk/resources/crm/associations_schema/labels.rb', line 186 def initialize(client:) @client = client end |
Instance Method Details
#batch_create(to_object_type, from_object_type:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponsePublicAssociationDefinitionUserConfiguration
Batch configure association limits between two object types.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hubspot_sdk/resources/crm/associations_schema/labels.rb', line 23 def batch_create(to_object_type, params) parsed, = HubSpotSDK::Crm::AssociationsSchema::LabelBatchCreateParams.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/create", from_object_type, to_object_type ], body: parsed, model: HubSpotSDK::Crm::BatchResponsePublicAssociationDefinitionUserConfiguration, options: ) end |
#create_label(to_object_type, from_object_type:, label:, name:, inverse_label: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponseAssociationSpecWithLabelNoPaging
Some parameter documentations has been truncated, see Models::Crm::AssociationsSchema::LabelCreateLabelParams for more details.
Create a new label that describes the relationship between two specified CRM object types. This can help in categorizing and managing associations more effectively.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/hubspot_sdk/resources/crm/associations_schema/labels.rb', line 67 def create_label(to_object_type, params) parsed, = HubSpotSDK::Crm::AssociationsSchema::LabelCreateLabelParams.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/%1$s/%2$s/labels", from_object_type, to_object_type], body: parsed, model: HubSpotSDK::Crm::CollectionResponseAssociationSpecWithLabelNoPaging, options: ) end |
#delete_label(association_type_id, from_object_type:, to_object_type:, request_options: {}) ⇒ nil
Remove a specific label from the association between two CRM object types.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/hubspot_sdk/resources/crm/associations_schema/labels.rb', line 94 def delete_label(association_type_id, params) parsed, = HubSpotSDK::Crm::AssociationsSchema::LabelDeleteLabelParams.dump_request(params) from_object_type = parsed.delete(:from_object_type) do raise ArgumentError.new("missing required path argument #{_1}") end to_object_type = parsed.delete(:to_object_type) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: [ "crm/associations/2026-03/%1$s/%2$s/labels/%3$s", from_object_type, to_object_type, association_type_id ], model: NilClass, options: ) end |
#list_labels(to_object_type, from_object_type:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::CollectionResponseAssociationSpecWithLabelNoPaging
Retrieve all labels that describe the relationships between two specified CRM object types. These labels provide context about the nature of the associations.
129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/hubspot_sdk/resources/crm/associations_schema/labels.rb', line 129 def list_labels(to_object_type, params) parsed, = HubSpotSDK::Crm::AssociationsSchema::LabelListLabelsParams.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/%1$s/%2$s/labels", from_object_type, to_object_type], model: HubSpotSDK::Crm::CollectionResponseAssociationSpecWithLabelNoPaging, options: ) end |
#update_label(to_object_type, from_object_type:, association_type_id:, label:, inverse_label: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Crm::AssociationsSchema::LabelUpdateLabelParams for more details.
Update an existing label that describes the relationship between two specified CRM object types. This allows for modifications to existing association labels to better reflect the nature of the relationship.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/hubspot_sdk/resources/crm/associations_schema/labels.rb', line 168 def update_label(to_object_type, params) parsed, = HubSpotSDK::Crm::AssociationsSchema::LabelUpdateLabelParams.dump_request(params) from_object_type = parsed.delete(:from_object_type) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: ["crm/associations/2026-03/%1$s/%2$s/labels", from_object_type, to_object_type], body: parsed, model: NilClass, options: ) end |