import six

from .node import Node


@six.python_2_unicode_compatible
class Investment(Node):
    """Represents a Investment (investor-investment) on CrunchBase"""

    KNOWN_PROPERTIES = [
        'type',
        'uuid',
        'money_invested',
        'money_invested_currency_code',
        'money_invested_usd',
    ]

    KNOWN_RELATIONSHIPS = [
        'funding_round',
        'invested_in',
    ]

    def __str__(self):
        return u'{series} {invested_in}'.format(
            series=self.funding_round.series,
            invested_in=self.invested_in.name,
        )

    def __repr__(self):
        return self.__str__()

@@ -394,22 +394,43 @@
 ed_in',%0A
+        'investors',%0A
     %5D%0A
-
 %0A    def
@@ -437,32 +437,68 @@
  __str__(self):%0A
+        if self.money_invested:%0A    
         return u
@@ -502,17 +502,8 @@
 n u'
-%7Bseries%7D 
 %7Binv
@@ -507,19 +507,16 @@
 invested
-_in
 %7D'.forma
@@ -534,98 +534,242 @@
     
-series=self.funding_round.series,%0A            invested_in=self.invested_in.name,%0A        )
+    self.money_invested%0A            )%0A%0A        if hasattr(self, 'investors'):%0A            return u'%7Binvestors%7D'.format(self.investors)%0A%0A        if self.type:%0A            return u'%7Btype%7D'.format(self.type)%0A%0A        return u'Investment'
 %0A%0A  

Add new relationship to Investment resource