Class: RubyPsigate::Address

Inherits:
Object
  • Object
show all
Includes:
HashVariables
Defined in:
lib/ruby_psigate/address.rb

Overview

DOC - TODO

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashVariables

included

Instance Attribute Details

#cityObject Also known as: bcity, scity

Returns the value of attribute city.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def city
  @city
end

#companyObject Also known as: bcompany, scompany

Returns the value of attribute company.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def company
  @company
end

#countryObject Also known as: bcountry, scountry

Returns the value of attribute country.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def country
  @country
end

#faxObject

Returns the value of attribute fax.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def fax
  @fax
end

#firstnameObject

Returns the value of attribute firstname.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def firstname
  @firstname
end

#lastnameObject

Returns the value of attribute lastname.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def lastname
  @lastname
end

#line1Object Also known as: address1

Returns the value of attribute line1.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def line1
  @line1
end

#line2Object Also known as: address2

Returns the value of attribute line2.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def line2
  @line2
end

#stateObject Also known as: province

Returns the value of attribute state.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def state
  @state
end

#telephoneObject Also known as: phone

Returns the value of attribute telephone.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def telephone
  @telephone
end

#zipcodeObject Also known as: postalcode

Returns the value of attribute zipcode.



11
12
13
# File 'lib/ruby_psigate/address.rb', line 11

def zipcode
  @zipcode
end

Instance Method Details

#nameObject Also known as: bname, sname



24
25
26
# File 'lib/ruby_psigate/address.rb', line 24

def name
  "#{firstname} #{lastname}".strip
end

#to_hash(type = nil) ⇒ Object



28
29
30
31
32
# File 'lib/ruby_psigate/address.rb', line 28

def to_hash(type = nil)
  result = super
  result = result.delete_if { |key, value| value.nil? }  # Delete empty hash values
  result
end