Class: HubSpotSDK::Models::Events::AssociationDefinition

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/hubspot_sdk/models/events/association_definition.rb

Defined Under Namespace

Modules: Cardinality, Category, FromObjectType, HiddenReason, InverseCardinality, ToObjectType

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, allows_custom_labels:, cardinality:, category:, from_object_type_id:, has_all_associated_objects:, has_cascading_deletes:, has_user_enforced_max_from_object_ids:, has_user_enforced_max_to_object_ids:, hidden:, inverse_allows_custom_labels:, inverse_cardinality:, inverse_has_all_associated_objects:, inverse_id:, inverse_name:, is_default:, is_inverse_primary:, is_primary:, max_from_object_ids:, max_to_object_ids:, name:, portal_unique_identifier:, read_only:, to_object_type_id:, from_object_type: nil, hidden_reason: nil, inverse_label: nil, label: nil, to_object_type: nil) ⇒ Object

Some parameter documentations has been truncated, see HubSpotSDK::Models::Events::AssociationDefinition for more details.

The definition of an association

Parameters:

  • id (Integer)

    The unique ID of the associated object (e.g., a contact ID).

  • allows_custom_labels (Boolean)

    Whether custom labels can be used in the association.

  • cardinality (Symbol, HubSpotSDK::Models::Events::AssociationDefinition::Cardinality)

    The cardinality from the source object’s perspective, either “ONE_TO_ONE” or “ON

  • category (Symbol, HubSpotSDK::Models::Events::AssociationDefinition::Category)

    The error category

  • from_object_type_id (String)

    The ID of the source object type (e.g., 0-1 for contacts).

  • has_all_associated_objects (Boolean)

    Whether all potential linked objects are included in the association

  • has_cascading_deletes (Boolean)

    Whether deletions in the association should cause cascading deletes to linked ob

  • has_user_enforced_max_from_object_ids (Boolean)

    Whether a user has set a limit for the number of source objects.

  • has_user_enforced_max_to_object_ids (Boolean)

    Whether a user has set a limit for the number of destination objects.

  • hidden (Boolean)

    Whether the association is hidden or not.

  • inverse_allows_custom_labels (Boolean)

    Whether the reverse association can also support custom labels.

  • inverse_cardinality (Symbol, HubSpotSDK::Models::Events::AssociationDefinition::InverseCardinality)

    The cardinality from the destination object’s perspective, either “ONE_TO_ONE” o

  • inverse_has_all_associated_objects (Boolean)

    Whether all potential reverse linked objects are included in the association.

  • inverse_id (Integer)

    The unique ID for the inverse side of the association.

  • inverse_name (String)

    The name used to describe the inverse relationship in this association

  • is_default (Boolean)
  • is_inverse_primary (Boolean)

    Whether the inverse association is considered primary.

  • is_primary (Boolean)

    Whether the association is the primary link between the entities involved.

  • max_from_object_ids (Integer)

    The maximum number of source object IDs allowed in the association.

  • max_to_object_ids (Integer)

    The maximum number of destination object IDs allowed in the association.

  • name (String)

    For labeled association types, the internal name of the association.

  • portal_unique_identifier (String)

    A unique across-portal ID applied to the association.

  • read_only (Boolean)
  • to_object_type_id (String)

    The ID of the destination object type (e.g., 0-3 for deals).

  • from_object_type (Symbol, HubSpotSDK::Models::Events::AssociationDefinition::FromObjectType) (defaults to: nil)

    The name of the source object type (e.g,. “DEAL” or “QUOTE”).

  • hidden_reason (Symbol, HubSpotSDK::Models::Events::AssociationDefinition::HiddenReason) (defaults to: nil)
  • inverse_label (String) (defaults to: nil)

    The label used to describe the reverse relationship in an association.

  • label (String) (defaults to: nil)

    The label given to an association.

  • to_object_type (Symbol, HubSpotSDK::Models::Events::AssociationDefinition::ToObjectType) (defaults to: nil)

    The name of the destination object type (e.g,. “DEAL” or “QUOTE”).



# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 199

Instance Attribute Details

#allows_custom_labelsBoolean

Whether custom labels can be used in the association.

Returns:

  • (Boolean)


17
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 17

required :allows_custom_labels, HubSpotSDK::Internal::Type::Boolean, api_name: :allowsCustomLabels

#cardinalitySymbol, HubSpotSDK::Models::Events::AssociationDefinition::Cardinality

The cardinality from the source object’s perspective, either “ONE_TO_ONE” or “ONE_TO_MANY”.



24
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 24

required :cardinality, enum: -> { HubSpotSDK::Events::AssociationDefinition::Cardinality }

#categorySymbol, HubSpotSDK::Models::Events::AssociationDefinition::Category

The error category



30
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 30

required :category, enum: -> { HubSpotSDK::Events::AssociationDefinition::Category }

#from_object_typeSymbol, ...

The name of the source object type (e.g,. “DEAL” or “QUOTE”).



168
169
170
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 168

optional :from_object_type,
enum: -> { HubSpotSDK::Events::AssociationDefinition::FromObjectType },
api_name: :fromObjectType

#from_object_type_idString

The ID of the source object type (e.g., 0-1 for contacts).

Returns:

  • (String)


36
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 36

required :from_object_type_id, String, api_name: :fromObjectTypeId

#has_all_associated_objectsBoolean

Whether all potential linked objects are included in the association

Returns:

  • (Boolean)


42
43
44
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 42

required :has_all_associated_objects,
HubSpotSDK::Internal::Type::Boolean,
api_name: :hasAllAssociatedObjects

#has_cascading_deletesBoolean

Whether deletions in the association should cause cascading deletes to linked objects.

Returns:

  • (Boolean)


51
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 51

required :has_cascading_deletes, HubSpotSDK::Internal::Type::Boolean, api_name: :hasCascadingDeletes

#has_user_enforced_max_from_object_idsBoolean

Whether a user has set a limit for the number of source objects.

Returns:

  • (Boolean)


57
58
59
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 57

required :has_user_enforced_max_from_object_ids,
HubSpotSDK::Internal::Type::Boolean,
api_name: :hasUserEnforcedMaxFromObjectIds

#has_user_enforced_max_to_object_idsBoolean

Whether a user has set a limit for the number of destination objects.

Returns:

  • (Boolean)


65
66
67
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 65

required :has_user_enforced_max_to_object_ids,
HubSpotSDK::Internal::Type::Boolean,
api_name: :hasUserEnforcedMaxToObjectIds

#hiddenBoolean

Whether the association is hidden or not.

Returns:

  • (Boolean)


73
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 73

required :hidden, HubSpotSDK::Internal::Type::Boolean

#hidden_reasonSymbol, ...



175
176
177
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 175

optional :hidden_reason,
enum: -> { HubSpotSDK::Events::AssociationDefinition::HiddenReason },
api_name: :hiddenReason

#idInteger

The unique ID of the associated object (e.g., a contact ID).

Returns:

  • (Integer)


11
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 11

required :id, Integer

#inverse_allows_custom_labelsBoolean

Whether the reverse association can also support custom labels.

Returns:

  • (Boolean)


79
80
81
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 79

required :inverse_allows_custom_labels,
HubSpotSDK::Internal::Type::Boolean,
api_name: :inverseAllowsCustomLabels

#inverse_cardinalitySymbol, HubSpotSDK::Models::Events::AssociationDefinition::InverseCardinality

The cardinality from the destination object’s perspective, either “ONE_TO_ONE” or “ONE_TO_MANY”.



88
89
90
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 88

required :inverse_cardinality,
enum: -> { HubSpotSDK::Events::AssociationDefinition::InverseCardinality },
api_name: :inverseCardinality

#inverse_has_all_associated_objectsBoolean

Whether all potential reverse linked objects are included in the association.

Returns:

  • (Boolean)


96
97
98
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 96

required :inverse_has_all_associated_objects,
HubSpotSDK::Internal::Type::Boolean,
api_name: :inverseHasAllAssociatedObjects

#inverse_idInteger

The unique ID for the inverse side of the association.

Returns:

  • (Integer)


104
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 104

required :inverse_id, Integer, api_name: :inverseId

#inverse_labelString?

The label used to describe the reverse relationship in an association.

Returns:

  • (String, nil)


183
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 183

optional :inverse_label, String, api_name: :inverseLabel

#inverse_nameString

The name used to describe the inverse relationship in this association

Returns:

  • (String)


110
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 110

required :inverse_name, String, api_name: :inverseName

#is_defaultBoolean

Returns:

  • (Boolean)


115
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 115

required :is_default, HubSpotSDK::Internal::Type::Boolean, api_name: :isDefault

#is_inverse_primaryBoolean

Whether the inverse association is considered primary.

Returns:

  • (Boolean)


121
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 121

required :is_inverse_primary, HubSpotSDK::Internal::Type::Boolean, api_name: :isInversePrimary

#is_primaryBoolean

Whether the association is the primary link between the entities involved.

Returns:

  • (Boolean)


127
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 127

required :is_primary, HubSpotSDK::Internal::Type::Boolean, api_name: :isPrimary

#labelString?

The label given to an association.

Returns:

  • (String, nil)


189
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 189

optional :label, String

#max_from_object_idsInteger

The maximum number of source object IDs allowed in the association.

Returns:

  • (Integer)


133
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 133

required :max_from_object_ids, Integer, api_name: :maxFromObjectIds

#max_to_object_idsInteger

The maximum number of destination object IDs allowed in the association.

Returns:

  • (Integer)


139
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 139

required :max_to_object_ids, Integer, api_name: :maxToObjectIds

#nameString

For labeled association types, the internal name of the association.

Returns:

  • (String)


145
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 145

required :name, String

#portal_unique_identifierString

A unique across-portal ID applied to the association.

Returns:

  • (String)


151
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 151

required :portal_unique_identifier, String, api_name: :portalUniqueIdentifier

#read_onlyBoolean

Returns:

  • (Boolean)


156
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 156

required :read_only, HubSpotSDK::Internal::Type::Boolean, api_name: :readOnly

#to_object_typeSymbol, ...

The name of the destination object type (e.g,. “DEAL” or “QUOTE”).



195
196
197
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 195

optional :to_object_type,
enum: -> { HubSpotSDK::Events::AssociationDefinition::ToObjectType },
api_name: :toObjectType

#to_object_type_idString

The ID of the destination object type (e.g., 0-3 for deals).

Returns:

  • (String)


162
# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 162

required :to_object_type_id, String, api_name: :toObjectTypeId

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/hubspot_sdk/models/events/association_definition.rb', line 273