Class: PagSeguro::Address
- Inherits:
-
Object
- Object
- PagSeguro::Address
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/pagseguro/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Get the city.
-
#complement ⇒ Object
Get the complement.
-
#country ⇒ Object
Get the country.
-
#district ⇒ Object
Get the district.
-
#number ⇒ Object
Set the number.
-
#postal_code ⇒ Object
Set the postal_code.
-
#state ⇒ Object
Get the state.
-
#street ⇒ Object
Set the street name.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(options = {}) ⇒ Address
Returns a new instance of Address.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/pagseguro/address.rb', line 35 def initialize( = {}) @country = "BRA" @postal_code = [:postal_code] @street = [:street] @number = [:number] @complement = [:complement] @district = [:district] @city = [:city] @state = [:state] end |
Instance Attribute Details
#city ⇒ Object
Get the city.
27 28 29 |
# File 'lib/pagseguro/address.rb', line 27 def city @city end |
#complement ⇒ Object
Get the complement.
21 22 23 |
# File 'lib/pagseguro/address.rb', line 21 def complement @complement end |
#country ⇒ Object
Get the country.
33 34 35 |
# File 'lib/pagseguro/address.rb', line 33 def country @country end |
#district ⇒ Object
Get the district.
24 25 26 |
# File 'lib/pagseguro/address.rb', line 24 def district @district end |
#number ⇒ Object
Set the number.
18 19 20 |
# File 'lib/pagseguro/address.rb', line 18 def number @number end |
#postal_code ⇒ Object
Set the postal_code. 8 digit number represeting a valid CEP i.e 01452002
12 13 14 |
# File 'lib/pagseguro/address.rb', line 12 def postal_code @postal_code end |
#state ⇒ Object
Get the state.
30 31 32 |
# File 'lib/pagseguro/address.rb', line 30 def state @state end |
#street ⇒ Object
Set the street name.
15 16 17 |
# File 'lib/pagseguro/address.rb', line 15 def street @street end |