class Etsy::Country

Public Class Methods

find(id) click to toggle source
# File lib/etsy/country.rb, line 13
def self.find(id)
  get("/countries/#{id}")
end
find_all() click to toggle source
# File lib/etsy/country.rb, line 9
def self.find_all
  get("/countries")
end
find_by_alpha2(alpha2) click to toggle source
# File lib/etsy/country.rb, line 17
def self.find_by_alpha2(alpha2)
  alpha2 = alpha2.upcase
  find_all.detect { |country| country.iso_country_code == alpha2}
end
find_by_world_bank_country_code(world_bank_country_code) click to toggle source
# File lib/etsy/country.rb, line 22
def self.find_by_world_bank_country_code(world_bank_country_code)
  world_bank_country_code = world_bank_country_code.upcase
  find_all.detect { |country| country.world_bank_country_code == world_bank_country_code}
end