Module: AbrLookup
- Defined in:
- lib/abr_lookup.rb,
lib/abr_lookup/lookup.rb,
lib/abr_lookup/server.rb,
lib/abr_lookup/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
- .abn_lookup_uri ⇒ Object
-
.config_path ⇒ Object
The path to find the configuration file.
-
.config_path=(path) ⇒ Object
Set the path to the configuration file.
-
.configuration ⇒ Object
The configuration for abn lookup The available options are :guid - the authentication guid abr.business.gov.au/ :path - the path to match when using middleware.
-
.configuration=(config) ⇒ Object
Set the configuration for the abn lookup The options that are useful are.
- .guid ⇒ Object
Class Method Details
.abn_lookup_uri ⇒ Object
10 11 12 |
# File 'lib/abr_lookup.rb', line 10 def self.abn_lookup_uri @abn_lookup_url ||= URI.parse("http://abr.business.gov.au/ABRXMLSearchRPC/ABRXMLSearch.asmx/ABRSearchByABN") end |
.config_path ⇒ Object
The path to find the configuration file
34 35 36 |
# File 'lib/abr_lookup.rb', line 34 def self.config_path @config_path ||= 'config/abr.yml' end |
.config_path=(path) ⇒ Object
Set the path to the configuration file
39 40 41 |
# File 'lib/abr_lookup.rb', line 39 def self.config_path=(path) @config_path = path end |
.configuration ⇒ Object
The configuration for abn lookup The available options are :guid - the authentication guid abr.business.gov.au/ :path - the path to match when using middleware
22 23 24 |
# File 'lib/abr_lookup.rb', line 22 def self.configuration @configuration ||= setup_config end |
.configuration=(config) ⇒ Object
Set the configuration for the abn lookup The options that are useful are
29 30 31 |
# File 'lib/abr_lookup.rb', line 29 def self.configuration=(config) @configuration = config end |
.guid ⇒ Object
14 15 16 |
# File 'lib/abr_lookup.rb', line 14 def self.guid (configuration['guid'] || configuration[:guid]).to_s end |