#NEWLINE# def create( self , session ) : #NEWLINE# #INDENT# url = self . _get_url ( self , self . id ) #NEWLINE# headers = self . get_headers ( ) #NEWLINE# headers [ 'Accept' ] = '' #NEWLINE# if ( self . data is not None ) : #NEWLINE# #INDENT# resp = session . put ( url , endpoint_filter = self . service , data = self . data , headers = headers ) . headers #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# resp = session . post ( url , endpoint_filter = self . service , data = None , headers = headers ) . headers #NEWLINE# #UNINDENT# self . set_headers ( resp ) #NEWLINE# return self