@@ -17,6 +17,7 @@ class TrafficType(BaseResource):
1717
1818 def __init__ (self , data , client = None ):
1919 '''
20+ Constructor
2021 '''
2122 BaseResource .__init__ (self , data .get ('id' ), client )
2223 self ._name = data .get ('name' )
@@ -40,6 +41,14 @@ def display_attribute_id(self, new):
4041
4142 def fetch_attributes (self , identify_client = None ):
4243 '''
44+ Fetch all attributes for this traffic type
45+
46+ :param identify_client: If this instance wasn't returned by the client,
47+ the IdentifyClient instance should be passed in order to perform the
48+ http call
49+
50+ :returns: List of attributes associated with this traffic type
51+ :rtype: list(Attribute)
4352 '''
4453 if identify_client is not None :
4554 amc = identify_client .attribute
@@ -52,6 +61,15 @@ def fetch_attributes(self, identify_client=None):
5261
5362 def add_attribute (self , data , identify_client = None ):
5463 '''
64+ Add a new attribute associated with this traffic type
65+
66+ :param data: Attribute instance or dict containing Attribute properties
67+ :param identify_client: If this instance wasn't returned by the client,
68+ the IdentifyClient instance should be passed in order to perform the
69+ http call
70+
71+ :returns: Newly created attribute
72+ :rtype: Attribute
5573 '''
5674 if identify_client is not None :
5775 amc = identify_client .attribute
@@ -68,6 +86,15 @@ def add_attribute(self, data, identify_client=None):
6886
6987 def add_identity (self , data , identify_client = None ):
7088 '''
89+ Add a new identity associated with this traffic type.
90+
91+ :param data: Identity object or dict containing identity properties
92+ :param identify_client: If this instance wasn't returned by the client,
93+ the IdentifyClient instance should be passed in order to perform the
94+ http call
95+
96+ :returns: newly created Identity
97+ :rtype: Identity
7198 '''
7299 if identify_client is not None :
73100 imc = identify_client .identity
@@ -84,6 +111,18 @@ def add_identity(self, data, identify_client=None):
84111
85112 def add_identities (self , data , identify_client = None ):
86113 '''
114+ Add multiple new identities associated with this traffic type.
115+
116+ :param data: list ofIdentity objects or dicts containing identity
117+ properties
118+ :param identify_client: If this instance wasn't returned by the client,
119+ the IdentifyClient instance should be passed in order to perform the
120+ http call
121+
122+ :returns: tuple with successful and failed items. Succesful items
123+ are Identity objects. Failed ones will contain the Identity object
124+ for the failed item togegther with a status code and a message
125+ :rtype: tuple
87126 '''
88127 if identify_client is not None :
89128 imc = identify_client .identity
0 commit comments