def find_all(account_id, options = {})
      response = JSON.parse(@client.get('direct_debit_authorities', { account_id: account_id }.merge(options)).body)
      direct_debit_authorities = response.key?('direct_debit_authorities') ? response['direct_debit_authorities'] : []
      direct_debit_authorities.map { |attributes| Promisepay::DirectDebitAuthority.new(@client, attributes) }
    end
def find_all(account_id, options = {})
      response = JSON.parse(@client.get('direct_debit_authorities', { account_id: account_id }.merge(options)).body)
      direct_debit_authorities = response.key?('direct_debit_authorities') ? response['direct_debit_authorities'] : []
      direct_debit_authorities.map { |attributes| Promisepay::DirectDebitAuthority.new(@client, attributes) }
    end
List existing direct debit authorities for a given bank account

 @see https://reference.promisepay.com/#list-direct-debit-authorities

 @param account_id [String] account id to retrieve direct debit authorities from.
 @param options [Hash] Optional options.
 @option options [Integer] :limit Can ask for up to 200 users. default: 10
 @option options [Integer] :offset Pagination help. default: 0

 @return [Array<Promisepay::DirectDebitAuthority>] List of direct debit authorities.