Class: PagSeguro::Document

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/pagseguro/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Document

Returns a new instance of Document.



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

def initialize(value)
  @type = 'CPF'
  @value = value
end

Instance Attribute Details

#typeObject

Set the document type Only CPF is acceptable



9
10
11
# File 'lib/pagseguro/document.rb', line 9

def type
  @type
end

#valueObject

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



13
14
15
# File 'lib/pagseguro/document.rb', line 13

def value
  @value
end