Sha256: 532b0998af7af71d670bd3e9c5572bf1b186dd2500c8fd1b7f0c271578e8b2ce

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

# encoding: utf-8

# https://api.crunchbase.com/v/2/organization/facebook/offices

module Crunchbase
  class Office < CBEntity

    RESOURCE_LIST = 'offices'
    attr_reader :type_name, :name, :street_1, :street_2, :postal_code, :city, :city_path,
                :region, :region_path, :country, :country_path, :latitude, :longitude,
                :created_at, :updated_at
                
    def initialize(json)
      @type_name      = json['type']
      @name           = json['name']
      @street_1       = json['street_1']
      @street_2       = json['street_2']
      @postal_code    = json['postal_code']
      @city           = json['city']
      @city_path      = json['city_path']
      @region         = json['region']
      @region_path    = json['region_path']
      @country        = json['country']
      @country_path   = json['country_path']
      @latitude       = json['latitude']
      @longitude      = json['longitude']
      @created_at     = Time.at(json['created_at']).utc
      @updated_at     = Time.at(json['updated_at']).utc
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
crunchbase_v2-1.1.2 lib/crunchbase/office.rb
crunchbase_v2-1.1.1 lib/crunchbase/office.rb