Module: Cccode

Defined in:
lib/cccode.rb,
lib/cccode/version.rb,
lib/cccode/models/country_code.rb,
lib/generators/cccode/install_generator.rb

Defined Under Namespace

Modules: Generators Classes: Codes, CountryCode, Misc, Soap

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.get_allObject

Cccode.get_all



32
33
34
35
36
# File 'lib/cccode.rb', line 32

def self.get_all
  Cccode::CountryCode.destroy_all
  s = Soap.new
  s.get_all
end

.get_countriesObject

SOAP actions Cccode.get_countries



40
41
42
43
# File 'lib/cccode.rb', line 40

def self.get_countries
  s = Soap.new
  s.countries
end

.get_country_code(country) ⇒ Object

Cccode.get_country_code(‘Spain’)



46
47
48
49
# File 'lib/cccode.rb', line 46

def self.get_country_code(country)
  s = Soap.new
  s.country_code(country)
end

.get_currency(country) ⇒ Object



51
52
53
54
# File 'lib/cccode.rb', line 51

def self.get_currency(country)
  s = Soap.new
  s.currency(country)
end

.get_currency_code(currency) ⇒ Object



56
57
58
59
# File 'lib/cccode.rb', line 56

def self.get_currency_code(currency)
  s = Soap.new
  s.currency_code(currency)
end

.resetObject

database actions Cccode.reset



27
28
29
# File 'lib/cccode.rb', line 27

def self.reset
  Cccode::CountryCode.destroy_all
end