Class: Mailtrap::ContactImport

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailtrap/contact_import.rb

Overview

Data Transfer Object for Contact Import

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contacts_over_limit_countInteger? (readonly)

Number of contacts over the allowed limit

Returns:

  • (Integer, nil)

    the current value of contacts_over_limit_count



10
11
12
# File 'lib/mailtrap/contact_import.rb', line 10

def contacts_over_limit_count
  @contacts_over_limit_count
end

#created_contacts_countInteger? (readonly)

Number of contacts created in this import

Returns:

  • (Integer, nil)

    the current value of created_contacts_count



10
11
12
# File 'lib/mailtrap/contact_import.rb', line 10

def created_contacts_count
  @created_contacts_count
end

#idInteger (readonly)

The contact import ID

Returns:

  • (Integer)

    the current value of id



10
11
12
# File 'lib/mailtrap/contact_import.rb', line 10

def id
  @id
end

#statusString (readonly)

The status of the import (created, started, finished, failed)

Returns:

  • (String)

    the current value of status



10
11
12
# File 'lib/mailtrap/contact_import.rb', line 10

def status
  @status
end

#updated_contacts_countInteger? (readonly)

Number of contacts updated in this import

Returns:

  • (Integer, nil)

    the current value of updated_contacts_count



10
11
12
# File 'lib/mailtrap/contact_import.rb', line 10

def updated_contacts_count
  @updated_contacts_count
end

Instance Method Details

#to_hHash

Returns The contact attributes as a hash.

Returns:

  • (Hash)

    The contact attributes as a hash



19
20
21
# File 'lib/mailtrap/contact_import.rb', line 19

def to_h
  super.compact
end