Class: PagSeguro::Person

Inherits:
Object
  • Object
show all
Includes:
Extensions::EnsureType, Extensions::MassAssignment
Defined in:
lib/pagseguro/person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Extensions::EnsureType

#ensure_type

Methods included from Extensions::MassAssignment

#initialize

Instance Attribute Details

#addressObject

Set the account address.



14
15
16
# File 'lib/pagseguro/person.rb', line 14

def address
  @address
end

#birth_dateObject

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

#nameObject

Set the account name.



7
8
9
# File 'lib/pagseguro/person.rb', line 7

def name
  @name
end

Instance Method Details

#documentsObject



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

#phonesObject



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