Method: Merge::Crm::AssociationType#initialize

Defined in:
lib/merge_ruby_client/crm/types/association_type.rb

#initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, source_object_class: OMIT, target_object_classes: OMIT, remote_key_name: OMIT, display_name: OMIT, cardinality: OMIT, is_required: OMIT, additional_properties: nil) ⇒ Merge::Crm::AssociationType

Parameters:

  • id (String) (defaults to: OMIT)
  • remote_id (String) (defaults to: OMIT)

    The third-party API ID of the matching object.

  • created_at (DateTime) (defaults to: OMIT)

    The datetime that this object was created by Merge.

  • modified_at (DateTime) (defaults to: OMIT)

    The datetime that this object was modified by Merge.

  • source_object_class (Hash{String => Object}) (defaults to: OMIT)

    The class of the source object (Custom Object or Common Model) for the association type.

  • target_object_classes (Array<Merge::Crm::AssociationSubType>) (defaults to: OMIT)
  • remote_key_name (String) (defaults to: OMIT)
  • display_name (String) (defaults to: OMIT)
  • cardinality (Merge::Crm::CardinalityEnum) (defaults to: OMIT)
  • is_required (Boolean) (defaults to: OMIT)
  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/merge_ruby_client/crm/types/association_type.rb', line 59

def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, source_object_class: OMIT,
               target_object_classes: OMIT, remote_key_name: OMIT, display_name: OMIT, cardinality: OMIT, is_required: OMIT, additional_properties: nil)
  @id = id if id != OMIT
  @remote_id = remote_id if remote_id != OMIT
  @created_at = created_at if created_at != OMIT
  @modified_at = modified_at if modified_at != OMIT
  @source_object_class = source_object_class if source_object_class != OMIT
  @target_object_classes = target_object_classes if target_object_classes != OMIT
  @remote_key_name = remote_key_name if remote_key_name != OMIT
  @display_name = display_name if display_name != OMIT
  @cardinality = cardinality if cardinality != OMIT
  @is_required = is_required if is_required != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "id": id,
    "remote_id": remote_id,
    "created_at": created_at,
    "modified_at": modified_at,
    "source_object_class": source_object_class,
    "target_object_classes": target_object_classes,
    "remote_key_name": remote_key_name,
    "display_name": display_name,
    "cardinality": cardinality,
    "is_required": is_required
  }.reject do |_k, v|
    v == OMIT
  end
end