Sha256: 7052f6ce622ddb9f9ec5a53c3fae2e6aa30dece93127fdeab6777b0a25e0edfe

Contents?: true

Size: 805 Bytes

Versions: 1

Compression:

Stored size: 805 Bytes

Contents

module AmoCRM::Entities
  class Contact
    include Virtus.model
    attribute :name, String
    attribute :request_id, Integer
    attribute :date_create, Time
    attribute :last_modified, Time
    attribute :responsible_user_id, Integer
    attribute :linked_leads_id, Array[Integer]
    attribute :tags, Array[String]
    attribute :company_name, String

    attribute :custom_fields, Array[CustomFieldValue]

    def attributes_for_update
      {
        name: name,
        request_id: request_id,
        date_create: date_create.to_i,
        last_modified: last_modified.to_i,
        responsible_user_id: responsible_user_id,
        linked_leads_id: linked_leads_id,
        tags: tags,
        company_name: company_name,
        custom_fields: custom_fields.as_json
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amo_crm-0.2.2 lib/amo_crm/entities/contact.rb