Class: Crunchbase::ServiceProvider
- Defined in:
- lib/crunchbase/service_provider.rb
Constant Summary collapse
- ENT_NAME =
"service-provider"- ENT_PLURAL =
"service-providers"
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#crunchbase_url ⇒ Object
readonly
Returns the value of attribute crunchbase_url.
-
#external_links ⇒ Object
readonly
Returns the value of attribute external_links.
-
#homepage_url ⇒ Object
readonly
Returns the value of attribute homepage_url.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#offices ⇒ Object
readonly
Returns the value of attribute offices.
-
#overview ⇒ Object
readonly
Returns the value of attribute overview.
-
#permalink ⇒ Object
readonly
Returns the value of attribute permalink.
-
#phone_number ⇒ Object
readonly
Returns the value of attribute phone_number.
-
#providerships ⇒ Object
readonly
Returns the value of attribute providerships.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ ServiceProvider
constructor
A new instance of ServiceProvider.
Methods inherited from CB_Object
#===, #aliases, all, find, get, #tags
Constructor Details
#initialize(json) ⇒ ServiceProvider
Returns a new instance of ServiceProvider.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/crunchbase/service_provider.rb', line 12 def initialize(json) @name = json["name"] @permalink = json["permalink"] @crunchbase_url = json["crunchbase_url"] @homepage_url = json["homepage_url"] @phone_number = json["phone_number"] @tag_list = json["tag_list"] @alias_list = json["alias_list"] @created_at = DateTime.parse(json["created_at"]) @updated_at = DateTime.parse(json["updated_at"]) @overview = json["overview"] @image = json["image"] @offices = json["offices"] @providerships = Relationship.array_from_relationship_list(json["providerships"]) if json["providerships"] @external_links = json["external_links"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def created_at @created_at end |
#crunchbase_url ⇒ Object (readonly)
Returns the value of attribute crunchbase_url.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def crunchbase_url @crunchbase_url end |
#external_links ⇒ Object (readonly)
Returns the value of attribute external_links.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def external_links @external_links end |
#homepage_url ⇒ Object (readonly)
Returns the value of attribute homepage_url.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def homepage_url @homepage_url end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def image @image end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def name @name end |
#offices ⇒ Object (readonly)
Returns the value of attribute offices.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def offices @offices end |
#overview ⇒ Object (readonly)
Returns the value of attribute overview.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def overview @overview end |
#permalink ⇒ Object (readonly)
Returns the value of attribute permalink.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def permalink @permalink end |
#phone_number ⇒ Object (readonly)
Returns the value of attribute phone_number.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def phone_number @phone_number end |
#providerships ⇒ Object (readonly)
Returns the value of attribute providerships.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def providerships @providerships end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/crunchbase/service_provider.rb', line 8 def updated_at @updated_at end |