Class: Cccode::Soap
- Inherits:
-
Object
- Object
- Cccode::Soap
- Defined in:
- lib/soap.rb
Constant Summary collapse
- WSDL =
'http://www.webservicex.net/country.asmx?WSDL'
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#command ⇒ Object
Returns the value of attribute command.
-
#countries ⇒ Object
Returns the value of attribute countries.
-
#country ⇒ Object
Returns the value of attribute country.
-
#country_code(country = nil) ⇒ Object
Returns the value of attribute country_code.
-
#currencies ⇒ Object
Returns the value of attribute currencies.
-
#currency(country = nil) ⇒ Object
Returns the value of attribute currency.
-
#currency_code(currency = nil) ⇒ Object
Returns the value of attribute currency_code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
-
#result ⇒ Object
writeonly
Sets the attribute result.
-
#result_keys ⇒ Object
Returns the value of attribute result_keys.
-
#xml ⇒ Object
Returns the value of attribute xml.
Class Method Summary collapse
Instance Method Summary collapse
- #get_all ⇒ Object
-
#initialize ⇒ Soap
constructor
A new instance of Soap.
-
#table_empty? ⇒ Boolean
todo: needed here? only model direct?.
Constructor Details
#initialize ⇒ Soap
Returns a new instance of Soap.
14 15 |
# File 'lib/soap.rb', line 14 def initialize end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
9 10 11 |
# File 'lib/soap.rb', line 9 def client @client end |
#command ⇒ Object
Returns the value of attribute command.
9 10 11 |
# File 'lib/soap.rb', line 9 def command @command end |
#countries ⇒ Object
Returns the value of attribute countries.
9 10 11 |
# File 'lib/soap.rb', line 9 def countries @countries end |
#country ⇒ Object
Returns the value of attribute country.
9 10 11 |
# File 'lib/soap.rb', line 9 def country @country end |
#country_code(country = nil) ⇒ Object
Returns the value of attribute country_code.
9 10 11 |
# File 'lib/soap.rb', line 9 def country_code @country_code end |
#currencies ⇒ Object
Returns the value of attribute currencies.
9 10 11 |
# File 'lib/soap.rb', line 9 def currencies @currencies end |
#currency(country = nil) ⇒ Object
Returns the value of attribute currency.
9 10 11 |
# File 'lib/soap.rb', line 9 def currency @currency end |
#currency_code(currency = nil) ⇒ Object
Returns the value of attribute currency_code.
9 10 11 |
# File 'lib/soap.rb', line 9 def currency_code @currency_code end |
#message ⇒ Object
Returns the value of attribute message.
9 10 11 |
# File 'lib/soap.rb', line 9 def @message end |
#response ⇒ Object
Returns the value of attribute response.
9 10 11 |
# File 'lib/soap.rb', line 9 def response @response end |
#result=(value) ⇒ Object
Sets the attribute result
9 10 11 |
# File 'lib/soap.rb', line 9 def result=(value) @result = value end |
#result_keys ⇒ Object
Returns the value of attribute result_keys.
9 10 11 |
# File 'lib/soap.rb', line 9 def result_keys @result_keys end |
#xml ⇒ Object
Returns the value of attribute xml.
9 10 11 |
# File 'lib/soap.rb', line 9 def xml @xml end |
Class Method Details
.table_empty? ⇒ Boolean
22 23 24 |
# File 'lib/soap.rb', line 22 def self.table_empty? !Cccode::CountryCode.exists? end |
Instance Method Details
#get_all ⇒ Object
30 31 32 33 |
# File 'lib/soap.rb', line 30 def get_all get_xml(:get_currency_code) Cccode::CountryCode.insert_all(@xml) end |
#table_empty? ⇒ Boolean
todo: needed here? only model direct?
18 19 20 |
# File 'lib/soap.rb', line 18 def table_empty? Cccode::Soap.table_empty? end |