Class: CapsuleCRM::Country

Inherits:
Object
  • Object
show all
Includes:
Virtus
Defined in:
lib/capsule_crm/country.rb

Class Method Summary collapse

Class Method Details

.allObject

Public: Retrieve a list of countries from Capsule

Examples

CapsuleCRM::Country.all

Returns an Array of CapsuleCRM::Country objects



14
15
16
17
18
19
# File 'lib/capsule_crm/country.rb', line 14

def self.all
  CapsuleCRM::Connection.
    get('/api/countries')['countries']['country'].map do |country_name|
    new name: country_name
  end
end