def query options = {}
      qs = ""
      if options && options.size > 0
        qs = "?" + options.map { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&')
      end
      
      uri = "v1/accounts/#{account.address}/payments#{qs}"
      
      RippleRest.get(uri)["payments"].map do |i|
        payment = Payment.new(i["payment"])
        payment.client_resource_id = i["client_resource_id"]
        payment
      end
    end
def query options = {}
      qs = ""
      if options && options.size > 0
        qs = "?" + options.map { |k,v| "#{k}=#{CGI::escape(v.to_s)}" }.join('&')
      end
      
      uri = "v1/accounts/#{account.address}/payments#{qs}"
      
      RippleRest.get(uri)["payments"].map do |i|
        payment = Payment.new(i["payment"])
        payment.client_resource_id = i["client_resource_id"]
        payment
      end
    end
Browse historical payments in bulk.
 @option options [String, Account] :source_account If specified, limit the results to payments initiated by a particular account
 @option options [String, Account] :destination_account If specified, limit the results to payments made to a particular account
 @option options [Boolean] :exclude_failed if set to true, this will return only payment that were successfully validated and written into the Ripple Ledger
 @option options [String] :start_ledger If earliest_first is set to true this will be the index number of the earliest ledger queried, or the most recent one if earliest_first is set to false. Defaults to the first ledger the rippled has in its complete ledger. An error will be returned if this value is outside the rippled's complete ledger set
 @option options [String] :end_ledger If earliest_first is set to true this will be the index number of the most recent ledger queried, or the earliest one if earliest_first is set to false. Defaults to the last ledger the rippled has in its complete ledger. An error will be returned if this value is outside the rippled's complete ledger set
 @option options [Boolean] :earliest_first Determines the order in which the results should be displayed. Defaults to true
 @option options [Fixnum] :results_per_page Limits the number of resources displayed per page. Defaults to 20
 @option options [Fixnum] :page The page to be displayed. If there are fewer than the results_per_page number displayed, this indicates that this is the last page
 @raise [RippleRestError] if RippleRest server returns an error
 @raise [ProtocolError] if protocol is wrong or network is down
 @return [Array<Payment>]