Sha256: 4e1db47c0b1b69c265d0033f27cb0471ed7762668df6f7e21957440db199a78f

Contents?: true

Size: 861 Bytes

Versions: 4

Compression:

Stored size: 861 Bytes

Contents

# encoding: utf-8

# https://api.crunchbase.com/v/2/person/#{permalink}/primary_affiliation?user_key=#{user_key}

module Crunchbase
  class PrimaryAffiliation < CBEntity
    RESOURCE_LIST = 'primary_affiliation'
    
    attr_reader :organization_name, :organization_path, :organization_permalink, :title, :started_on, :ended_on

    def initialize(json)
      @organization_name        = json['organization_name']
      @organization_permalink   = (json['organization_path'] && json['organization_path'].gsub('organization/', '') || nil)
      @organization_path        = json['organization_path']
      @title                    = json['title']
      @started_on               = (json['started_on'] && json['started_on'].to_datetime.utc || nil)
      @ended_on                 = (json['ended_on'] && json['ended_on'].to_datetime.utc || nil)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
crunchbase_v2-1.1.6 lib/crunchbase/primary_affiliation.rb
crunchbase_v2-1.1.5 lib/crunchbase/primary_affiliation.rb
crunchbase_v2-1.1.4 lib/crunchbase/primary_affiliation.rb
crunchbase_v2-1.1.3 lib/crunchbase/primary_affiliation.rb