mundipagg 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,13 @@
1
- require 'savon'
2
- require 'mundipagg/gateway'
3
- require 'mundipagg/CreateOrderRequest'
4
- require 'mundipagg/BoletoTransaction'
5
- require 'mundipagg/CreditCardTransaction'
6
- require 'mundipagg/Buyer'
7
- require 'mundipagg/BuyerAddress'
8
- require 'mundipagg/QueryOrderRequest'
9
- require 'mundipagg/ManageOrderRequest'
10
- require 'mundipagg/Recurrency'
11
- require 'mundipagg/post_notification'
12
- require 'mundipagg/ShoppingCart'
13
- require 'mundipagg/ShoppingCartItem'
1
+ require 'savon'
2
+ require 'mundipagg/gateway'
3
+ require 'mundipagg/CreateOrderRequest'
4
+ require 'mundipagg/BoletoTransaction'
5
+ require 'mundipagg/CreditCardTransaction'
6
+ require 'mundipagg/Buyer'
7
+ require 'mundipagg/BuyerAddress'
8
+ require 'mundipagg/QueryOrderRequest'
9
+ require 'mundipagg/ManageOrderRequest'
10
+ require 'mundipagg/Recurrency'
11
+ require 'mundipagg/post_notification'
12
+ require 'mundipagg/ShoppingCart'
13
+ require 'mundipagg/ShoppingCartItem'
@@ -1,31 +1,31 @@
1
- module Mundipagg
2
- class BoletoTransaction
3
-
4
- # @return [Long] Transaction amount in cents
5
- attr_accessor :amountInCents
6
-
7
- # @return [Integer] Bank code
8
- attr_accessor :bankNumber
9
-
10
- # @return [Integer] How many days after the creation the boleto will be valid.
11
- # @param Default: 7
12
- attr_accessor :daysToAddInBoletoExpirationDate
13
-
14
- # @return [Integer] Number used to identify the boleto
15
- attr_accessor :nossoNumero
16
-
17
- # @return [Long] Text with payment instructions. Limit: 120 characters.
18
- attr_accessor :instructions
19
-
20
- # @return [Long] Custom transaction identifier.
21
- attr_accessor :transactionReference
22
-
23
- # Initialize class with default values
24
- def initialize
25
- @amountInCents = 0
26
- @daysToAddInBoletoExpirationDate = 7
27
- end
28
-
29
-
30
- end
1
+ module Mundipagg
2
+ class BoletoTransaction
3
+
4
+ # @return [Long] Transaction amount in cents
5
+ attr_accessor :amountInCents
6
+
7
+ # @return [Integer] Bank code
8
+ attr_accessor :bankNumber
9
+
10
+ # @return [Integer] How many days after the creation the boleto will be valid.
11
+ # @param Default: 7
12
+ attr_accessor :daysToAddInBoletoExpirationDate
13
+
14
+ # @return [Integer] Number used to identify the boleto
15
+ attr_accessor :nossoNumero
16
+
17
+ # @return [Long] Text with payment instructions. Limit: 120 characters.
18
+ attr_accessor :instructions
19
+
20
+ # @return [Long] Custom transaction identifier.
21
+ attr_accessor :transactionReference
22
+
23
+ # Initialize class with default values
24
+ def initialize
25
+ @amountInCents = 0
26
+ @daysToAddInBoletoExpirationDate = 7
27
+ end
28
+
29
+
30
+ end
31
31
  end
@@ -1,82 +1,82 @@
1
- module Mundipagg
2
- class Buyer
3
-
4
- # @return [Guid] Buyer unique idenfitication. Generated by MundiPagg.
5
- # param Default: 00000000-0000-0000-0000-000000000000 (Guid empty)
6
- attr_accessor :buyerKey
7
- # @return [String] Buyer custom idenfitication.
8
- attr_accessor :buyerReference
9
- # @return [String] Email address.
10
- attr_accessor :email
11
- # @return [String] Facebook ID.
12
- attr_accessor :facebookId
13
- # @return [String] Gender.
14
- attr_accessor :genderEnum
15
- # @return [String] Home phone.
16
- attr_accessor :homePhone
17
- # @return [String] IP Address.
18
- attr_accessor :ipAddress
19
- # @return [String] Mobile phone.
20
- attr_accessor :mobilePhone
21
- # @return [String] Work phone.
22
- attr_accessor :workPhone
23
- # @return [String] Buyer full name.
24
- attr_accessor :name
25
- # <i>Person</i> for individual people information and <i>Company</i> for enterprise information
26
- # @return [String] Type.
27
- # @param Default: Person
28
- attr_accessor :personTypeEnum
29
- # @return [String] Document number.
30
- attr_accessor :taxDocumentNumber
31
- #<i>CPF<i> for person document number or <i>CNPJ</i> for company document number.
32
- # @return [String] Document type.
33
- # @param Default: CPF
34
- attr_accessor :taxDocumentTypeEnum
35
- # @return [String] Twitter ID.
36
- attr_accessor :twitterId
37
- # @return [Array] Array of addresses.
38
- # @see BuyerAddress
39
- attr_accessor :addressCollection
40
-
41
- # Gender
42
- @@Gender = {
43
- :Male => 'M',
44
- :Female => 'F'
45
- }
46
-
47
- # Person Type
48
- @@PersonType = {
49
- :Person => 'Person',
50
- :Company => 'Company'
51
- }
52
-
53
- # Document Type
54
- @@DocumentType = {
55
- :CPF => 'CPF',
56
- :CNPJ => 'CNPJ'
57
- }
58
-
59
- # Initialize class with properties
60
- def initialize
61
- @addressCollection = Array.new
62
- @buyerKey = '00000000-0000-0000-0000-000000000000'
63
- @personTypeEnum = Buyer.PersonTypeEnum[:Person]
64
- @taxDocumentTypeEnum = Buyer.DocumentTypeEnum[:CPF]
65
- end
66
-
67
- # Gender enum
68
- def self.GenderEnum
69
- @@Gender
70
- end
71
-
72
- # Person type enum
73
- def self.PersonTypeEnum
74
- @@PersonType
75
- end
76
-
77
- # Document type enum
78
- def self.DocumentTypeEnum
79
- @@DocumentType
80
- end
81
- end
1
+ module Mundipagg
2
+ class Buyer
3
+
4
+ # @return [Guid] Buyer unique idenfitication. Generated by MundiPagg.
5
+ # param Default: 00000000-0000-0000-0000-000000000000 (Guid empty)
6
+ attr_accessor :buyerKey
7
+ # @return [String] Buyer custom idenfitication.
8
+ attr_accessor :buyerReference
9
+ # @return [String] Email address.
10
+ attr_accessor :email
11
+ # @return [String] Facebook ID.
12
+ attr_accessor :facebookId
13
+ # @return [String] Gender.
14
+ attr_accessor :genderEnum
15
+ # @return [String] Home phone.
16
+ attr_accessor :homePhone
17
+ # @return [String] IP Address.
18
+ attr_accessor :ipAddress
19
+ # @return [String] Mobile phone.
20
+ attr_accessor :mobilePhone
21
+ # @return [String] Work phone.
22
+ attr_accessor :workPhone
23
+ # @return [String] Buyer full name.
24
+ attr_accessor :name
25
+ # <i>Person</i> for individual people information and <i>Company</i> for enterprise information
26
+ # @return [String] Type.
27
+ # @param Default: Person
28
+ attr_accessor :personTypeEnum
29
+ # @return [String] Document number.
30
+ attr_accessor :taxDocumentNumber
31
+ #<i>CPF<i> for person document number or <i>CNPJ</i> for company document number.
32
+ # @return [String] Document type.
33
+ # @param Default: CPF
34
+ attr_accessor :taxDocumentTypeEnum
35
+ # @return [String] Twitter ID.
36
+ attr_accessor :twitterId
37
+ # @return [Array] Array of addresses.
38
+ # @see BuyerAddress
39
+ attr_accessor :addressCollection
40
+
41
+ # Gender
42
+ @@Gender = {
43
+ :Male => 'M',
44
+ :Female => 'F'
45
+ }
46
+
47
+ # Person Type
48
+ @@PersonType = {
49
+ :Person => 'Person',
50
+ :Company => 'Company'
51
+ }
52
+
53
+ # Document Type
54
+ @@DocumentType = {
55
+ :CPF => 'CPF',
56
+ :CNPJ => 'CNPJ'
57
+ }
58
+
59
+ # Initialize class with properties
60
+ def initialize
61
+ @addressCollection = Array.new
62
+ @buyerKey = '00000000-0000-0000-0000-000000000000'
63
+ @personTypeEnum = Buyer.PersonTypeEnum[:Person]
64
+ @taxDocumentTypeEnum = Buyer.DocumentTypeEnum[:CPF]
65
+ end
66
+
67
+ # Gender enum
68
+ def self.GenderEnum
69
+ @@Gender
70
+ end
71
+
72
+ # Person type enum
73
+ def self.PersonTypeEnum
74
+ @@PersonType
75
+ end
76
+
77
+ # Document type enum
78
+ def self.DocumentTypeEnum
79
+ @@DocumentType
80
+ end
81
+ end
82
82
  end
@@ -1,69 +1,69 @@
1
- module Mundipagg
2
- class BuyerAddress
3
-
4
- # @return [String] Address Type.
5
- # @see AddressTypeEnum
6
- # @param Default: Residential
7
- attr_accessor :addressTypeEnum
8
- # @return [String] City.
9
- attr_accessor :city
10
- # @return [String] Address complement.
11
- attr_accessor :complement
12
- # @return [String] Address country.
13
- # @param Default: Brazil
14
- # @see CountryEnum
15
- attr_accessor :countryEnum
16
- # @return [String] District.
17
- attr_accessor :district
18
- # @return [String] Address number.
19
- attr_accessor :number
20
- # @return [String] Address state.
21
- attr_accessor :state
22
- # @return [String] Street.
23
- attr_accessor :street
24
- # @return [String] Zip Code.
25
- attr_accessor :zipCode
26
-
27
-
28
- #Address Type Enum
29
- @@ADDRESS_TYPE={
30
- :Billing => 'Billing',
31
- :Shipping => 'Shipping',
32
- :Work => 'Comercial',
33
- :Home => 'Residential'
34
- }
35
-
36
-
37
- # Country Enum
38
- @@COUNTRY = {
39
- :Brazil => 'Brazil',
40
- :UnitedStates => 'USA',
41
- :Argentina => 'Argentina',
42
- :Bolivia => 'Bolivia',
43
- :Chile => 'Chile',
44
- :Colombia => 'Colombia',
45
- :Uruguay => 'Uruguay',
46
- :Mexico => 'Mexico',
47
- :Paraguay => 'Paraguay'
48
- }
49
-
50
- #Initialize class with properties
51
- def initialize
52
- @addressTypeEnum = BuyerAddress.AddressTypeEnum[:Home]
53
- @countryEnum = BuyerAddress.CountryEnum[:Brazil]
54
- end
55
-
56
- #Address Type Enum
57
- # @see @@ADDRESS_TYPE
58
- def self.AddressTypeEnum
59
- @@ADDRESS_TYPE
60
- end
61
-
62
- # Country Enum
63
- # @see @@COUNTRY
64
- def self.CountryEnum
65
- @@COUNTRY
66
- end
67
-
68
- end
1
+ module Mundipagg
2
+ class BuyerAddress
3
+
4
+ # @return [String] Address Type.
5
+ # @see AddressTypeEnum
6
+ # @param Default: Residential
7
+ attr_accessor :addressTypeEnum
8
+ # @return [String] City.
9
+ attr_accessor :city
10
+ # @return [String] Address complement.
11
+ attr_accessor :complement
12
+ # @return [String] Address country.
13
+ # @param Default: Brazil
14
+ # @see CountryEnum
15
+ attr_accessor :countryEnum
16
+ # @return [String] District.
17
+ attr_accessor :district
18
+ # @return [String] Address number.
19
+ attr_accessor :number
20
+ # @return [String] Address state.
21
+ attr_accessor :state
22
+ # @return [String] Street.
23
+ attr_accessor :street
24
+ # @return [String] Zip Code.
25
+ attr_accessor :zipCode
26
+
27
+
28
+ #Address Type Enum
29
+ @@ADDRESS_TYPE={
30
+ :Billing => 'Billing',
31
+ :Shipping => 'Shipping',
32
+ :Work => 'Comercial',
33
+ :Home => 'Residential'
34
+ }
35
+
36
+
37
+ # Country Enum
38
+ @@COUNTRY = {
39
+ :Brazil => 'Brazil',
40
+ :UnitedStates => 'USA',
41
+ :Argentina => 'Argentina',
42
+ :Bolivia => 'Bolivia',
43
+ :Chile => 'Chile',
44
+ :Colombia => 'Colombia',
45
+ :Uruguay => 'Uruguay',
46
+ :Mexico => 'Mexico',
47
+ :Paraguay => 'Paraguay'
48
+ }
49
+
50
+ #Initialize class with properties
51
+ def initialize
52
+ @addressTypeEnum = BuyerAddress.AddressTypeEnum[:Home]
53
+ @countryEnum = BuyerAddress.CountryEnum[:Brazil]
54
+ end
55
+
56
+ #Address Type Enum
57
+ # @see @@ADDRESS_TYPE
58
+ def self.AddressTypeEnum
59
+ @@ADDRESS_TYPE
60
+ end
61
+
62
+ # Country Enum
63
+ # @see @@COUNTRY
64
+ def self.CountryEnum
65
+ @@COUNTRY
66
+ end
67
+
68
+ end
69
69
  end
@@ -1,66 +1,66 @@
1
- module Mundipagg
2
- class CreateOrderRequest
3
- # @return [Long] Order amount in cents
4
- attr_accessor :amountInCents
5
-
6
- # @return [Long] Amount (in cents) to consider the order is paid
7
- attr_accessor :amountInCentsToConsiderPaid
8
-
9
- # @return [String] Order amount currency.
10
- # @param Default: BRL
11
- # @see CurrencyIsoEnum
12
- attr_accessor :currencyIsoEnum
13
-
14
- # @return [Buyer] Buyer instance
15
- # @see Buyer
16
- attr_accessor :buyer
17
-
18
- # @return [Array] Array with all Shopping Carts
19
- attr_accessor :shoppingCartCollection
20
-
21
- # @return [Guid] MundiPagg merchant identification
22
- attr_accessor :merchantKey
23
-
24
- # If merchant not send OrderReference, Mundipagg will generate and return in the response.
25
- # @return [String] Custom order identification.
26
- attr_accessor :orderReference
27
-
28
- # @return [Array] Array with all credit card transactions
29
- attr_accessor :creditCardTransactionCollection
30
-
31
- # @return [Array] Array with all boleto transactions
32
- attr_accessor :boletoTransactionCollection
33
-
34
- # If not send, it will be generate automatically in the webservice and returned in response.
35
- # Web service request identification, it is used for investigate problems with webservice requests.
36
- # @return [Guid] Globally Unique Identifier.
37
- # @param Optional
38
- # @param Default: 00000000-0000-0000-0000-000000000000
39
- attr_accessor :requestKey
40
-
41
- # Currency Enum
42
- # @returns [Hash<Symbol, String>]
43
- @@CURRENCY_ISO ={
44
- :BrazillianReal => 'BRL',
45
- :AmericanDollar => 'USD'
46
- }
47
-
48
- # Initialize class and properties
49
- def initialize
50
- @shoppingCartCollection = Array.new;
51
- @creditCardTransactionCollection = Array.new;
52
- @boletoTransactionCollection = Array.new;
53
- @currencyIsoEnum = CreateOrderRequest.CurrencyIsoEnum[:BrazillianReal]
54
- @requestKey = '00000000-0000-0000-0000-000000000000'
55
-
56
- end
57
-
58
- # Currency Enum
59
- # @returns [Hash<Symbol, String>]
60
- # @see @@CURRENCY_ISO
61
- def self.CurrencyIsoEnum
62
- @@CURRENCY_ISO
63
- end
64
-
65
- end
66
- end
1
+ module Mundipagg
2
+ class CreateOrderRequest
3
+ # @return [Long] Order amount in cents
4
+ attr_accessor :amountInCents
5
+
6
+ # @return [Long] Amount (in cents) to consider the order is paid
7
+ attr_accessor :amountInCentsToConsiderPaid
8
+
9
+ # @return [String] Order amount currency.
10
+ # @param Default: BRL
11
+ # @see CurrencyIsoEnum
12
+ attr_accessor :currencyIsoEnum
13
+
14
+ # @return [Buyer] Buyer instance
15
+ # @see Buyer
16
+ attr_accessor :buyer
17
+
18
+ # @return [Array] Array with all Shopping Carts
19
+ attr_accessor :shoppingCartCollection
20
+
21
+ # @return [Guid] MundiPagg merchant identification
22
+ attr_accessor :merchantKey
23
+
24
+ # If merchant not send OrderReference, Mundipagg will generate and return in the response.
25
+ # @return [String] Custom order identification.
26
+ attr_accessor :orderReference
27
+
28
+ # @return [Array] Array with all credit card transactions
29
+ attr_accessor :creditCardTransactionCollection
30
+
31
+ # @return [Array] Array with all boleto transactions
32
+ attr_accessor :boletoTransactionCollection
33
+
34
+ # If not send, it will be generate automatically in the webservice and returned in response.
35
+ # Web service request identification, it is used for investigate problems with webservice requests.
36
+ # @return [Guid] Globally Unique Identifier.
37
+ # @param Optional
38
+ # @param Default: 00000000-0000-0000-0000-000000000000
39
+ attr_accessor :requestKey
40
+
41
+ # Currency Enum
42
+ # @returns [Hash<Symbol, String>]
43
+ @@CURRENCY_ISO ={
44
+ :BrazillianReal => 'BRL',
45
+ :AmericanDollar => 'USD'
46
+ }
47
+
48
+ # Initialize class and properties
49
+ def initialize
50
+ @shoppingCartCollection = Array.new;
51
+ @creditCardTransactionCollection = Array.new;
52
+ @boletoTransactionCollection = Array.new;
53
+ @currencyIsoEnum = CreateOrderRequest.CurrencyIsoEnum[:BrazillianReal]
54
+ @requestKey = '00000000-0000-0000-0000-000000000000'
55
+
56
+ end
57
+
58
+ # Currency Enum
59
+ # @returns [Hash<Symbol, String>]
60
+ # @see @@CURRENCY_ISO
61
+ def self.CurrencyIsoEnum
62
+ @@CURRENCY_ISO
63
+ end
64
+
65
+ end
66
+ end