#NEWLINE# def purchase( self , status_callback_url = None , **kwargs ) : #NEWLINE# #INDENT# '\n        Attempt to purchase the specified number. The only required parameters\n        are **either** phone_number or area_code\n\n        :returns: Returns a :class:`PhoneNumber` instance on success,\n                  :data:`False` on failure\n        :raises: A :exc:`TypeError` if neither phone_number or area_code\n        is specified.\n        ' #NEWLINE# kwargs [ 'StatusCallback' ] = kwargs . get ( 'status_callback' , status_callback_url ) #NEWLINE# if ( ( 'phone_number' not in kwargs ) and ( 'area_code' not in kwargs ) ) : #NEWLINE# #INDENT# raise TypeError ( 'phone_number or area_code is required' ) #NEWLINE# #UNINDENT# number_type = kwargs . pop ( 'type' , False ) #NEWLINE# uri = self . uri #NEWLINE# if number_type : #NEWLINE# #INDENT# uri = ( '%s/%s' % ( self . uri , TYPES [ number_type ] ) ) #NEWLINE# #UNINDENT# params = transform_params ( kwargs ) #NEWLINE# ( resp , instance ) = self . request ( 'POST' , uri , data = params ) #NEWLINE# return self . load_instance ( instance )