Class: PagSeguro::Phone

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Extensions::MassAssignment

#initialize

Instance Attribute Details

#area_codeObject

Set the area code.



10
11
12
# File 'lib/pagseguro/phone.rb', line 10

def area_code
  @area_code
end

#numberObject

Set the phone number. Must have 7-9 numbers.



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

def number
  @number
end

#typeObject

Set the type phone Must be HOME, MOBILE or BUSINESS



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

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
# File 'lib/pagseguro/phone.rb', line 16

def ==(other)
  [type, area_code, number] == [other.type, other.area_code, other.number]
end