Class: Kiva::LoanFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/kiva.rb

Overview

Filter to be used in order to describe the intended search results of Loan.search

Instance Attribute Summary

Attributes inherited from Filter

#params

Instance Method Summary collapse

Methods inherited from Filter

#[], #[]=, #initialize

Constructor Details

This class inherits a constructor from Kiva::Filter

Instance Method Details

#africaObject

restrict region



704
705
706
707
# File 'lib/kiva.rb', line 704

def africa
  @params["region"]="af"
  return self
end

#amount_remainingObject

sort_by



641
642
643
644
# File 'lib/kiva.rb', line 641

def amount_remaining
  @params["sort_by"]="amount_remaining"
  return self
end

#asiaObject

restrict region



709
710
711
712
# File 'lib/kiva.rb', line 709

def asia
  @params["region"]="as"
  return self
end

#central_americaObject

restrict region



694
695
696
697
# File 'lib/kiva.rb', line 694

def central_america
  @params["region"]="ca"
  return self
end

#country_code=(iso_2) ⇒ Object



728
729
730
# File 'lib/kiva.rb', line 728

def country_code= iso_2
  @params["country_code"]=iso_2
end

#defaultedObject

restrict status



683
684
685
686
# File 'lib/kiva.rb', line 683

def defaulted
  @params["status"]="defaulted"
  return self
end

#eastern_europeObject

restrict region



719
720
721
722
# File 'lib/kiva.rb', line 719

def eastern_europe
  @params["region"]="ee"
  return self
end

#expirationObject

sort_by



631
632
633
634
# File 'lib/kiva.rb', line 631

def expiration
  @params["sort_by"]="expiration"
  return self
end

#femaleObject

restrict to female loan recipients



657
658
659
660
# File 'lib/kiva.rb', line 657

def female
  @params["gender"]="female"
  return self
end

#fundedObject

restrict status



668
669
670
671
# File 'lib/kiva.rb', line 668

def funded
  @params["status"]="funded"
  return self
end

#fundraisingObject

restrict status



663
664
665
666
# File 'lib/kiva.rb', line 663

def fundraising
  @params["status"]="fundraising"
  return self
end

#in_repaymentObject

restrict status



673
674
675
676
# File 'lib/kiva.rb', line 673

def in_repayment
  @params["status"]="in_repayment"
  return self
end

#loan_amountObject

sort_by



621
622
623
624
# File 'lib/kiva.rb', line 621

def loan_amount
  @params["sort_by"]="loan_amount"
  return self
end

#maleObject

restrict to male loan recipients



652
653
654
655
# File 'lib/kiva.rb', line 652

def male
  @params["gender"]="male"
  return self
end

#middle_eastObject

restrict region



714
715
716
717
# File 'lib/kiva.rb', line 714

def middle_east
  @params["region"]="me"
  return self
end

#newestObject

sort_by



636
637
638
639
# File 'lib/kiva.rb', line 636

def newest
  @params["sort_by"]="newest"
  return self
end

#north_americaObject

restrict region



689
690
691
692
# File 'lib/kiva.rb', line 689

def north_america
  @params["region"]="na"
  return self
end

#oldestObject

sort_by



626
627
628
629
# File 'lib/kiva.rb', line 626

def oldest
  @params["sort_by"]="oldest"
  return self
end

restrict status



678
679
680
681
# File 'lib/kiva.rb', line 678

def paid
  @params["status"]="paid"
  return self
end

#popularityObject

sort_by



616
617
618
619
# File 'lib/kiva.rb', line 616

def popularity
  @params["sort_by"]="popularity"
  return self
end

#query=(query) ⇒ Object

def partner

too lazy

end



736
737
738
# File 'lib/kiva.rb', line 736

def query= query
  @params["q"]=query
end

#repayment_termObject

sort_by



646
647
648
649
# File 'lib/kiva.rb', line 646

def repayment_term
  @params["sort_by"]="repayment_term"
  return self
end

#sector=(sector) ⇒ Object



725
726
727
# File 'lib/kiva.rb', line 725

def sector= sector
  @params["sector"]=sector
end

#south_americaObject

restrict region



699
700
701
702
# File 'lib/kiva.rb', line 699

def south_america
  @params["region"]="sa"
  return self
end