Sha256: 2a25cd43ed3025c53502ed4d3963c5f2f98a9dce05a355d5153bfaad312c952e

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

require 'hashie'
require 'active_support/time'

module DataComApi
  class Contact < Hashie::Trash
    property :id,               from: :contactId
    property :zip
    property :phone
    property :area_code,        from: :areaCode
    property :updated_at,       from: :updatedDate,  with: ->(v) { Time.parse(v.to_s).utc }
    property :seo_contact_url,  from: :seoContactURL
    property :state
    property :first_name,       from: :firstname
    property :last_name,        from: :lastname
    property :company_name,     from: :companyName
    property :contact_url,      from: :contactURL
    property :contact_sales,    from: :contactSales
    property :country
    property :owned
    property :city
    property :title
    property :email
    property :address
    property :graveyard_status, from: :graveyardStatus
    property :owned_type,       from: :ownedType
    property :company_id,       from: :companyId

    alias_method :graveyarded,  :graveyard_status
    alias_method :graveyarded?, :graveyarded
    alias_method :owned?,       :owned
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
data-com-api-0.2.1 lib/data-com-api/contact.rb
data-com-api-0.2.0 lib/data-com-api/contact.rb
data-com-api-0.1.5 lib/data-com-api/contact.rb
data-com-api-0.1.4 lib/data-com-api/contact.rb
data-com-api-0.1.3 lib/data-com-api/contact.rb
data-com-api-0.1.2 lib/data-com-api/contact.rb
data-com-api-0.1.1 lib/data-com-api/contact.rb
data-com-api-0.1.0 lib/data-com-api/contact.rb