Class: Mundipagg::Buyer

Inherits:
Object
  • Object
show all
Defined in:
lib/mundipagg/Buyer.rb

Constant Summary collapse

@@Gender =

Gender

{
	:Male => 'M',
	:Female => 'F'
}
@@PersonType =

Person Type

{
	:Person => 'Person',
	:Company => 'Company'
}
@@DocumentType =

Document Type

{
	:CPF => 'CPF',
	:CNPJ => 'CNPJ'
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuyer

Initialize class with properties


60
61
62
63
64
65
# File 'lib/mundipagg/Buyer.rb', line 60

def initialize
	@addressCollection = Array.new
	@buyerKey = '00000000-0000-0000-0000-000000000000'
	@personTypeEnum = Buyer.PersonTypeEnum[:Person]
	@taxDocumentTypeEnum = Buyer.DocumentTypeEnum[:CPF]
end

Instance Attribute Details

#addressCollectionArray

Returns Array of addresses.

Returns:

  • (Array)

    Array of addresses.

See Also:


39
40
41
# File 'lib/mundipagg/Buyer.rb', line 39

def addressCollection
  @addressCollection
end

#buyerKeyGuid

param Default: 00000000-0000-0000-0000-000000000000 (Guid empty)

Returns:

  • (Guid)

    Buyer unique idenfitication. Generated by MundiPagg.


6
7
8
# File 'lib/mundipagg/Buyer.rb', line 6

def buyerKey
  @buyerKey
end

#buyerReferenceString

Returns Buyer custom idenfitication.

Returns:

  • (String)

    Buyer custom idenfitication.


8
9
10
# File 'lib/mundipagg/Buyer.rb', line 8

def buyerReference
  @buyerReference
end

#emailString

Returns Email address.

Returns:

  • (String)

    Email address.


10
11
12
# File 'lib/mundipagg/Buyer.rb', line 10

def email
  @email
end

#facebookIdString

Returns Facebook ID.

Returns:

  • (String)

    Facebook ID.


12
13
14
# File 'lib/mundipagg/Buyer.rb', line 12

def facebookId
  @facebookId
end

#genderEnumString

Returns Gender.

Returns:

  • (String)

    Gender.


14
15
16
# File 'lib/mundipagg/Buyer.rb', line 14

def genderEnum
  @genderEnum
end

#homePhoneString

Returns Home phone.

Returns:

  • (String)

    Home phone.


16
17
18
# File 'lib/mundipagg/Buyer.rb', line 16

def homePhone
  @homePhone
end

#ipAddressString

Returns IP Address.

Returns:

  • (String)

    IP Address.


18
19
20
# File 'lib/mundipagg/Buyer.rb', line 18

def ipAddress
  @ipAddress
end

#mobilePhoneString

Returns Mobile phone.

Returns:

  • (String)

    Mobile phone.


20
21
22
# File 'lib/mundipagg/Buyer.rb', line 20

def mobilePhone
  @mobilePhone
end

#nameString

Returns Buyer full name.

Returns:

  • (String)

    Buyer full name.


24
25
26
# File 'lib/mundipagg/Buyer.rb', line 24

def name
  @name
end

#personTypeEnumString

Person for individual people information and Company for enterprise information

Parameters:

  • Default:

    Person

Returns:

  • (String)

    Type.


28
29
30
# File 'lib/mundipagg/Buyer.rb', line 28

def personTypeEnum
  @personTypeEnum
end

#taxDocumentNumberString

Returns Document number.

Returns:

  • (String)

    Document number.


30
31
32
# File 'lib/mundipagg/Buyer.rb', line 30

def taxDocumentNumber
  @taxDocumentNumber
end

#taxDocumentTypeEnumString

CPF<i> for person document number or <i>CNPJ for company document number.

Parameters:

  • Default:

    CPF

Returns:

  • (String)

    Document type.


34
35
36
# File 'lib/mundipagg/Buyer.rb', line 34

def taxDocumentTypeEnum
  @taxDocumentTypeEnum
end

#twitterIdString

Returns Twitter ID.

Returns:

  • (String)

    Twitter ID.


36
37
38
# File 'lib/mundipagg/Buyer.rb', line 36

def twitterId
  @twitterId
end

#workPhoneString

Returns Work phone.

Returns:

  • (String)

    Work phone.


22
23
24
# File 'lib/mundipagg/Buyer.rb', line 22

def workPhone
  @workPhone
end

Class Method Details

.DocumentTypeEnumObject

Document type enum


78
79
80
# File 'lib/mundipagg/Buyer.rb', line 78

def self.DocumentTypeEnum
	@@DocumentType
end

.GenderEnumObject

Gender enum


68
69
70
# File 'lib/mundipagg/Buyer.rb', line 68

def self.GenderEnum
	@@Gender
end

.PersonTypeEnumObject

Person type enum


73
74
75
# File 'lib/mundipagg/Buyer.rb', line 73

def self.PersonTypeEnum
	@@PersonType
end