#NEWLINE# def setQuota( self , key , value ) : #NEWLINE# #INDENT# 'Additional validation steps' #NEWLINE# if ( ( key == 'balance' ) and ( value is not None ) and ( value < 0 ) ) : #NEWLINE# #INDENT# raise jasminApiCredentialError ( ( '%s is not a valid value (%s), it must be None or a positive number' % ( key , value ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( key == 'early_decrement_balance_percent' ) and ( value is not None ) and ( ( value < 1 ) or ( value > 100 ) ) ) : #NEWLINE# #INDENT# raise jasminApiCredentialError ( ( '%s is not a valid value (%s), it must be None or a number in 1..100' % ( key , value ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( key == 'submit_sm_count' ) and ( value is not None ) and ( ( value < 0 ) or ( not isinstance ( value , int ) ) ) ) : #NEWLINE# #INDENT# raise jasminApiCredentialError ( ( '%s is not a valid value (%s), it must be a positive int' % ( key , value ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( key in [ 'http_throughput' , 'smpps_throughput' ] ) and ( value is not None ) and ( value < 0 ) ) : #NEWLINE# #INDENT# raise jasminApiCredentialError ( ( '%s is not a valid value (%s), it must be None or a positive number' % ( key , value ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# CredentialGenerick . setQuota ( self , key , self )