abr_lookup 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/abr_lookup/lookup.rb +4 -4
- data/lib/abr_lookup/version.rb +1 -1
- metadata +3 -3
data/lib/abr_lookup/lookup.rb
CHANGED
@@ -61,9 +61,9 @@ module AbrLookup
|
|
61
61
|
self.given_name = node.css('legalName givenName').text.strip
|
62
62
|
self.family_name = node.css('legalName familyName').text.strip
|
63
63
|
|
64
|
-
self.trading_name = node.css('mainTradingName organisationName' ).text.strip
|
65
|
-
self.state_code = node.css('mainBusinessPhysicalAddress stateCode' ).text.strip
|
66
|
-
self.postcode = node.css('mainBusinessPhysicalAddress postcode' ).text.strip
|
64
|
+
self.trading_name = node.css('mainTradingName organisationName' ).first.try(:text).try(:strip)
|
65
|
+
self.state_code = node.css('mainBusinessPhysicalAddress stateCode' ).first.try(:text).try(:strip)
|
66
|
+
self.postcode = node.css('mainBusinessPhysicalAddress postcode' ).first.try(:text).try(:strip)
|
67
67
|
|
68
68
|
node.css('exception').each do |exception|
|
69
69
|
errors.add(exception.css('exceptionCode').text.strip, exception.css('exceptionDescription').text.strip)
|
@@ -72,7 +72,7 @@ module AbrLookup
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def perform_abn_lookup
|
75
|
-
query = "searchString=#{lookup_number}&includeHistoricalDetails=
|
75
|
+
query = "searchString=#{lookup_number}&includeHistoricalDetails=N&authenticationGuid=#{AbrLookup.guid}"
|
76
76
|
uri = AbrLookup.abn_lookup_uri.dup
|
77
77
|
uri.query = query
|
78
78
|
Net::HTTP.get_response(uri).body
|
data/lib/abr_lookup/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abr_lookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Neighman
|