Class: CapsuleCRM::Country
- Inherits:
-
Object
- Object
- CapsuleCRM::Country
- Includes:
- Virtus
- Defined in:
- lib/capsule_crm/country.rb
Class Method Summary collapse
-
.all ⇒ Object
Public: Retrieve a list of countries from Capsule.
Class Method Details
.all ⇒ Object
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 |