Class: PagSeguro::Person
- Inherits:
-
Object
- Object
- PagSeguro::Person
- Includes:
- Extensions::EnsureType, Extensions::MassAssignment
- Defined in:
- lib/pagseguro/person.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Set the account address.
-
#birth_date ⇒ Object
Set the account birth_date.
-
#name ⇒ Object
Set the account name.
Instance Method Summary collapse
- #documents ⇒ Object
- #documents=(_documents = []) ⇒ Object
- #phones ⇒ Object
- #phones=(_phones = []) ⇒ Object
Methods included from Extensions::EnsureType
Methods included from Extensions::MassAssignment
Instance Attribute Details
#address ⇒ Object
Set the account address.
14 15 16 |
# File 'lib/pagseguro/person.rb', line 14 def address @address end |
#birth_date ⇒ Object
Set the account birth_date. Pattern: aaaa-MM-dd
11 12 13 |
# File 'lib/pagseguro/person.rb', line 11 def birth_date @birth_date end |
#name ⇒ Object
Set the account name.
7 8 9 |
# File 'lib/pagseguro/person.rb', line 7 def name @name end |
Instance Method Details
#documents ⇒ Object
20 21 22 |
# File 'lib/pagseguro/person.rb', line 20 def documents @documents ||= Documents.new end |
#documents=(_documents = []) ⇒ Object
24 25 26 27 28 |
# File 'lib/pagseguro/person.rb', line 24 def documents=(_documents=[]) _documents.each do |document| documents << ensure_type(Document, document) end end |
#phones ⇒ Object
30 31 32 |
# File 'lib/pagseguro/person.rb', line 30 def phones @phones ||= Phones.new end |
#phones=(_phones = []) ⇒ Object
34 35 36 37 38 |
# File 'lib/pagseguro/person.rb', line 34 def phones=(_phones=[]) _phones.each do |phone| phones << ensure_type(Phone, phone) end end |