class Abn::Entity

Attributes

abn[RW]
acn[RW]
active_from_date[RW]
address_from_date[RW]
address_post_code[RW]
address_state_code[RW]
entity_type[RW]
gst_from_date[RW]
last_updated[RW]
main_name[RW]
name[RW]
other_trading_name[RW]
status[RW]
trading_name[RW]

Public Instance Methods

best_name() click to toggle source

Choose the most relevant business name

@return [String] business name

# File lib/abn/entity.rb, line 26
def best_name
  @trading_name || @other_trading_name || @main_name || @legal_name || @legal_name2 || 'Name unknown'
end
instance_values() click to toggle source

Return the values in a hash. Stolen from ActiveSupport

@return [Hash] object attributes

# File lib/abn/entity.rb, line 33
def instance_values
  Hash[instance_variables.map { |name| [name[1..-1].to_sym, instance_variable_get(name)] }]
end