mundipagg_sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +61 -61
- data/lib/gateway/Address/billing_address.rb +32 -32
- data/lib/gateway/Address/buyer_address.rb +36 -36
- data/lib/gateway/Address/delivery_address.rb +32 -32
- data/lib/gateway/AntiFraud/anti_fraud_analysis_result.rb +47 -47
- data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_data.rb +51 -51
- data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_history_data.rb +41 -41
- data/lib/gateway/BaseRequest.rb +10 -10
- data/lib/gateway/BaseResponse.rb +17 -17
- data/lib/gateway/BoletoTransaction/boleto_transaction.rb +43 -43
- data/lib/gateway/BoletoTransaction/boleto_transaction_data.rb +43 -43
- data/lib/gateway/BoletoTransaction/boleto_transaction_options.rb +14 -14
- data/lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb +19 -19
- data/lib/gateway/BoletoTransaction/boleto_transaction_result.rb +34 -34
- data/lib/gateway/CreditCardTransaction/credit_card.rb +29 -29
- data/lib/gateway/CreditCardTransaction/credit_card_transaction.rb +31 -31
- data/lib/gateway/CreditCardTransaction/credit_card_transaction_data.rb +103 -103
- data/lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb +26 -26
- data/lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb +28 -28
- data/lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb +11 -11
- data/lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb +12 -12
- data/lib/gateway/ErrorItem.rb +17 -17
- data/lib/gateway/ErrorReport.rb +18 -18
- data/lib/gateway/Gateway.rb +441 -444
- data/lib/gateway/InstantBuy/credit_card_data.rb +40 -40
- data/lib/gateway/InstantBuy/get_instant_buy_data_response.rb +17 -17
- data/lib/gateway/Merchant/merchant.rb +10 -10
- data/lib/gateway/OnlineDebit/online_debit_transaction_report_file.rb +17 -17
- data/lib/gateway/Order/order.rb +10 -10
- data/lib/gateway/Order/order_transaction_report_file.rb +5 -5
- data/lib/gateway/Parsers/boleto_transaction_parser.rb +30 -30
- data/lib/gateway/Parsers/credit_card_transaction_parser.rb +39 -39
- data/lib/gateway/Parsers/header_parser.rb +13 -13
- data/lib/gateway/Parsers/online_debit_transaction_parser.rb +29 -29
- data/lib/gateway/Parsers/trailer_parser.rb +14 -14
- data/lib/gateway/Person/buyer.rb +32 -32
- data/lib/gateway/Person/person.rb +46 -46
- data/lib/gateway/Recurrency/recurrency.rb +22 -22
- data/lib/gateway/Sale/create_sale_request.rb +35 -35
- data/lib/gateway/Sale/create_sale_response.rb +24 -24
- data/lib/gateway/Sale/manage_sale_request.rb +16 -16
- data/lib/gateway/Sale/manage_sale_response.rb +14 -14
- data/lib/gateway/Sale/query_sale_request.rb +35 -35
- data/lib/gateway/Sale/query_sale_response.rb +17 -17
- data/lib/gateway/Sale/request_data.rb +19 -19
- data/lib/gateway/Sale/retry_sale_options.rb +13 -13
- data/lib/gateway/Sale/retry_sale_request.rb +21 -21
- data/lib/gateway/Sale/retry_sale_response.rb +13 -13
- data/lib/gateway/Sale/sale_data.rb +32 -32
- data/lib/gateway/Sale/sale_order_data.rb +16 -16
- data/lib/gateway/SalesOption.rb +17 -17
- data/lib/gateway/ShoppingCart/shopping_cart.rb +25 -25
- data/lib/gateway/ShoppingCart/shopping_cart_item.rb +22 -22
- data/lib/gateway/Trailer.rb +5 -5
- data/lib/gateway/address.rb +24 -24
- data/lib/gateway/header.rb +4 -4
- data/lib/gateway/post_notification.rb +28 -28
- data/lib/gateway/transaction_report_file.rb +44 -44
- data/lib/mundipagg_sdk.rb +70 -70
- data/mundipagg_sdk.gemspec +18 -18
- data/spec/integration/gateway_spec.rb +733 -651
- data/spec/integration/test_helper.rb +68 -68
- metadata +2 -2
data/lib/gateway/Person/buyer.rb
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
-
require_relative 'person'
|
2
|
-
|
3
|
-
class Buyer < Person
|
4
|
-
# Chave do comprador. Utilizada para identificar um comprador no gateway
|
5
|
-
attr_accessor :BuyerKey
|
6
|
-
|
7
|
-
# Refer�ncia do comprador no sistema da loja
|
8
|
-
attr_accessor :BuyerReference
|
9
|
-
|
10
|
-
# Lista de endere�os do comprador
|
11
|
-
attr_accessor :AddressCollection
|
12
|
-
|
13
|
-
# Data de cria��o do comprador no sistema da loja
|
14
|
-
attr_accessor :CreateDateInMerchant
|
15
|
-
|
16
|
-
# Data da �ltima atualiza��o do cadastro do comprador no sistema da loja
|
17
|
-
attr_accessor :LastBuyerUpdateInMerchant
|
18
|
-
|
19
|
-
# Categoria do comprador
|
20
|
-
attr_accessor :BuyerCategory
|
21
|
-
|
22
|
-
def initialize
|
23
|
-
@AddressCollection = Array.new
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
def to_json
|
28
|
-
hash = {}
|
29
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
30
|
-
hash
|
31
|
-
end
|
32
|
-
|
1
|
+
require_relative 'person'
|
2
|
+
|
3
|
+
class Buyer < Person
|
4
|
+
# Chave do comprador. Utilizada para identificar um comprador no gateway
|
5
|
+
attr_accessor :BuyerKey
|
6
|
+
|
7
|
+
# Refer�ncia do comprador no sistema da loja
|
8
|
+
attr_accessor :BuyerReference
|
9
|
+
|
10
|
+
# Lista de endere�os do comprador
|
11
|
+
attr_accessor :AddressCollection
|
12
|
+
|
13
|
+
# Data de cria��o do comprador no sistema da loja
|
14
|
+
attr_accessor :CreateDateInMerchant
|
15
|
+
|
16
|
+
# Data da �ltima atualiza��o do cadastro do comprador no sistema da loja
|
17
|
+
attr_accessor :LastBuyerUpdateInMerchant
|
18
|
+
|
19
|
+
# Categoria do comprador
|
20
|
+
attr_accessor :BuyerCategory
|
21
|
+
|
22
|
+
def initialize
|
23
|
+
@AddressCollection = Array.new
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
def to_json
|
28
|
+
hash = {}
|
29
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
30
|
+
hash
|
31
|
+
end
|
32
|
+
|
33
33
|
end
|
@@ -1,47 +1,47 @@
|
|
1
|
-
class Person
|
2
|
-
# Nome da pessoa
|
3
|
-
attr_accessor :Name
|
4
|
-
|
5
|
-
# Define se � pessoa f�sica ou jur�dica
|
6
|
-
attr_accessor :PersonType
|
7
|
-
|
8
|
-
# N�mero do documento
|
9
|
-
attr_accessor :DocumentNumber
|
10
|
-
|
11
|
-
# Tipo de documento
|
12
|
-
attr_accessor :DocumentType
|
13
|
-
|
14
|
-
# Sexo da pessoa
|
15
|
-
attr_accessor :Gender
|
16
|
-
|
17
|
-
# Data de nascimento
|
18
|
-
attr_accessor :Birthdate
|
19
|
-
|
20
|
-
# E-mail
|
21
|
-
attr_accessor :Email
|
22
|
-
|
23
|
-
# Tipo do email. Pessoal ou comercial
|
24
|
-
attr_accessor :EmailType
|
25
|
-
|
26
|
-
# C�digo identificador do cadastro no Facebook
|
27
|
-
attr_accessor :FacebookId
|
28
|
-
|
29
|
-
# C�digo identificador do cadastro no Twitter
|
30
|
-
attr_accessor :TwitterId
|
31
|
-
|
32
|
-
# Telefone celular
|
33
|
-
attr_accessor :MobilePhone
|
34
|
-
|
35
|
-
# Telefone Residencial
|
36
|
-
attr_accessor :HomePhone
|
37
|
-
|
38
|
-
# Telefone comercial
|
39
|
-
attr_accessor :WorkPhone
|
40
|
-
|
41
|
-
def to_json
|
42
|
-
hash = {}
|
43
|
-
instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
44
|
-
hash
|
45
|
-
end
|
46
|
-
|
1
|
+
class Person
|
2
|
+
# Nome da pessoa
|
3
|
+
attr_accessor :Name
|
4
|
+
|
5
|
+
# Define se � pessoa f�sica ou jur�dica
|
6
|
+
attr_accessor :PersonType
|
7
|
+
|
8
|
+
# N�mero do documento
|
9
|
+
attr_accessor :DocumentNumber
|
10
|
+
|
11
|
+
# Tipo de documento
|
12
|
+
attr_accessor :DocumentType
|
13
|
+
|
14
|
+
# Sexo da pessoa
|
15
|
+
attr_accessor :Gender
|
16
|
+
|
17
|
+
# Data de nascimento
|
18
|
+
attr_accessor :Birthdate
|
19
|
+
|
20
|
+
# E-mail
|
21
|
+
attr_accessor :Email
|
22
|
+
|
23
|
+
# Tipo do email. Pessoal ou comercial
|
24
|
+
attr_accessor :EmailType
|
25
|
+
|
26
|
+
# C�digo identificador do cadastro no Facebook
|
27
|
+
attr_accessor :FacebookId
|
28
|
+
|
29
|
+
# C�digo identificador do cadastro no Twitter
|
30
|
+
attr_accessor :TwitterId
|
31
|
+
|
32
|
+
# Telefone celular
|
33
|
+
attr_accessor :MobilePhone
|
34
|
+
|
35
|
+
# Telefone Residencial
|
36
|
+
attr_accessor :HomePhone
|
37
|
+
|
38
|
+
# Telefone comercial
|
39
|
+
attr_accessor :WorkPhone
|
40
|
+
|
41
|
+
def to_json
|
42
|
+
hash = {}
|
43
|
+
instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
44
|
+
hash
|
45
|
+
end
|
46
|
+
|
47
47
|
end
|
@@ -1,23 +1,23 @@
|
|
1
|
-
class Recurrency
|
2
|
-
# Frequ�ncia da recorr�ncia
|
3
|
-
attr_accessor :Frequency
|
4
|
-
|
5
|
-
# Intervalo de recorr�ncia
|
6
|
-
attr_accessor :Interval
|
7
|
-
|
8
|
-
# Data da primeira cobran�a
|
9
|
-
attr_accessor :DateToStartBilling
|
10
|
-
|
11
|
-
# Total de recorr�ncias
|
12
|
-
attr_accessor :Recurrences
|
13
|
-
|
14
|
-
# Informa se ser� necess�rio efetuar o procedimento OneDollarAuth antes de registrar a recorr�ncia
|
15
|
-
attr_accessor :OneDollarAuth
|
16
|
-
|
17
|
-
def to_json
|
18
|
-
hash = {}
|
19
|
-
instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
20
|
-
hash
|
21
|
-
end
|
22
|
-
|
1
|
+
class Recurrency
|
2
|
+
# Frequ�ncia da recorr�ncia
|
3
|
+
attr_accessor :Frequency
|
4
|
+
|
5
|
+
# Intervalo de recorr�ncia
|
6
|
+
attr_accessor :Interval
|
7
|
+
|
8
|
+
# Data da primeira cobran�a
|
9
|
+
attr_accessor :DateToStartBilling
|
10
|
+
|
11
|
+
# Total de recorr�ncias
|
12
|
+
attr_accessor :Recurrences
|
13
|
+
|
14
|
+
# Informa se ser� necess�rio efetuar o procedimento OneDollarAuth antes de registrar a recorr�ncia
|
15
|
+
attr_accessor :OneDollarAuth
|
16
|
+
|
17
|
+
def to_json
|
18
|
+
hash = {}
|
19
|
+
instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
23
|
end
|
@@ -1,36 +1,36 @@
|
|
1
|
-
class CreateSaleRequest
|
2
|
-
|
3
|
-
attr_accessor :CreditCardTransactionCollection
|
4
|
-
|
5
|
-
attr_accessor :BoletoTransactionCollection
|
6
|
-
|
7
|
-
attr_accessor :Order
|
8
|
-
|
9
|
-
attr_accessor :Buyer
|
10
|
-
|
11
|
-
attr_accessor :ShoppingCartCollection
|
12
|
-
|
13
|
-
attr_accessor :Options
|
14
|
-
|
15
|
-
attr_accessor :Merchant
|
16
|
-
|
17
|
-
attr_accessor :RequestData
|
18
|
-
|
19
|
-
def initialize
|
20
|
-
@CreditCardTransactionCollection = Array.new
|
21
|
-
@BoletoTransactionCollection = Array.new
|
22
|
-
@ShoppingCartCollection = Array.new
|
23
|
-
@Buyer = Buyer.new
|
24
|
-
@RequestData = RequestData.new
|
25
|
-
@Options = SalesOption.new
|
26
|
-
@Merchant = Merchant.new
|
27
|
-
@Order = Order.new
|
28
|
-
end
|
29
|
-
|
30
|
-
def to_json
|
31
|
-
hash = {}
|
32
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
33
|
-
hash
|
34
|
-
end
|
35
|
-
|
1
|
+
class CreateSaleRequest
|
2
|
+
|
3
|
+
attr_accessor :CreditCardTransactionCollection
|
4
|
+
|
5
|
+
attr_accessor :BoletoTransactionCollection
|
6
|
+
|
7
|
+
attr_accessor :Order
|
8
|
+
|
9
|
+
attr_accessor :Buyer
|
10
|
+
|
11
|
+
attr_accessor :ShoppingCartCollection
|
12
|
+
|
13
|
+
attr_accessor :Options
|
14
|
+
|
15
|
+
attr_accessor :Merchant
|
16
|
+
|
17
|
+
attr_accessor :RequestData
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
@CreditCardTransactionCollection = Array.new
|
21
|
+
@BoletoTransactionCollection = Array.new
|
22
|
+
@ShoppingCartCollection = Array.new
|
23
|
+
@Buyer = Buyer.new
|
24
|
+
@RequestData = RequestData.new
|
25
|
+
@Options = SalesOption.new
|
26
|
+
@Merchant = Merchant.new
|
27
|
+
@Order = Order.new
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_json
|
31
|
+
hash = {}
|
32
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
33
|
+
hash
|
34
|
+
end
|
35
|
+
|
36
36
|
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
class CreateSaleResponse
|
2
|
-
# Lista as transa��es de Cart�o de Cr�dito
|
3
|
-
attr_accessor :CreditCardTransactionResultCollection
|
4
|
-
|
5
|
-
# Lista as transa��es de boleto
|
6
|
-
attr_accessor :BoletoTransactionResultCollection
|
7
|
-
|
8
|
-
# Dados de retorno do pedido
|
9
|
-
attr_accessor :OrderResult
|
10
|
-
|
11
|
-
# Chave do comprador. Utilizada para identificar um comprador no gateway
|
12
|
-
attr_accessor :BuyerKey
|
13
|
-
|
14
|
-
def initialize
|
15
|
-
@CreditCardTransactionResultCollection = Array.new
|
16
|
-
@BoletoTransactionResultCollection = Array.new
|
17
|
-
end
|
18
|
-
|
19
|
-
def to_json
|
20
|
-
hash = {}
|
21
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
22
|
-
hash
|
23
|
-
end
|
24
|
-
|
1
|
+
class CreateSaleResponse
|
2
|
+
# Lista as transa��es de Cart�o de Cr�dito
|
3
|
+
attr_accessor :CreditCardTransactionResultCollection
|
4
|
+
|
5
|
+
# Lista as transa��es de boleto
|
6
|
+
attr_accessor :BoletoTransactionResultCollection
|
7
|
+
|
8
|
+
# Dados de retorno do pedido
|
9
|
+
attr_accessor :OrderResult
|
10
|
+
|
11
|
+
# Chave do comprador. Utilizada para identificar um comprador no gateway
|
12
|
+
attr_accessor :BuyerKey
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
@CreditCardTransactionResultCollection = Array.new
|
16
|
+
@BoletoTransactionResultCollection = Array.new
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_json
|
20
|
+
hash = {}
|
21
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
22
|
+
hash
|
23
|
+
end
|
24
|
+
|
25
25
|
end
|
@@ -1,17 +1,17 @@
|
|
1
|
-
class ManageSaleRequest
|
2
|
-
|
3
|
-
attr_accessor :CreditCardTransactionCollection
|
4
|
-
|
5
|
-
attr_accessor :OrderKey
|
6
|
-
|
7
|
-
def initialize
|
8
|
-
@CreditCardTransactionCollection = Array.new;
|
9
|
-
end
|
10
|
-
|
11
|
-
def to_json
|
12
|
-
hash = {}
|
13
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
14
|
-
hash
|
15
|
-
end
|
16
|
-
|
1
|
+
class ManageSaleRequest
|
2
|
+
|
3
|
+
attr_accessor :CreditCardTransactionCollection
|
4
|
+
|
5
|
+
attr_accessor :OrderKey
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@CreditCardTransactionCollection = Array.new;
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_json
|
12
|
+
hash = {}
|
13
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
14
|
+
hash
|
15
|
+
end
|
16
|
+
|
17
17
|
end
|
@@ -1,15 +1,15 @@
|
|
1
|
-
class ManageSaleResponse
|
2
|
-
# Cole��o de transa��es de cart�o de cr�dito
|
3
|
-
attr_accessor :CreditCardTransactionResultCollection
|
4
|
-
|
5
|
-
def initialize
|
6
|
-
@CreditCardTransactionResultCollection = Array.new
|
7
|
-
end
|
8
|
-
|
9
|
-
def to_json
|
10
|
-
hash = {}
|
11
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
12
|
-
hash
|
13
|
-
end
|
14
|
-
|
1
|
+
class ManageSaleResponse
|
2
|
+
# Cole��o de transa��es de cart�o de cr�dito
|
3
|
+
attr_accessor :CreditCardTransactionResultCollection
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@CreditCardTransactionResultCollection = Array.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def to_json
|
10
|
+
hash = {}
|
11
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
12
|
+
hash
|
13
|
+
end
|
14
|
+
|
15
15
|
end
|
@@ -1,36 +1,36 @@
|
|
1
|
-
class QuerySaleRequest
|
2
|
-
attr_accessor :OrderKey
|
3
|
-
|
4
|
-
attr_accessor :OrderReference
|
5
|
-
|
6
|
-
attr_accessor :CreditCardTransactionKey
|
7
|
-
|
8
|
-
attr_accessor :CreditCardTransactionReference
|
9
|
-
|
10
|
-
attr_accessor :BoletoTransactionKey
|
11
|
-
|
12
|
-
attr_accessor :BoletoTransactionReference
|
13
|
-
|
14
|
-
attr_accessor :QuerySaleRequestEnum
|
15
|
-
|
16
|
-
# Enum feito para as chamadas do m�todo query
|
17
|
-
@@QuerySaleRequestEnum = {
|
18
|
-
:OrderKey => 'OrderKey',
|
19
|
-
:OrderReference => 'OrderReference',
|
20
|
-
:CreditCardTransactionKey => 'CreditCardTransactionKey',
|
21
|
-
:CreditCardTransactionReference => 'CreditCardTransactionReference',
|
22
|
-
:BoletoTransactionKey => 'BoletoTransactionKey',
|
23
|
-
:BoletoTransactionReference => 'BoletoTransactionReference'
|
24
|
-
}
|
25
|
-
|
26
|
-
def self.QuerySaleRequestEnum
|
27
|
-
@@QuerySaleRequestEnum
|
28
|
-
end
|
29
|
-
|
30
|
-
def to_json
|
31
|
-
hash = {}
|
32
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
33
|
-
hash
|
34
|
-
end
|
35
|
-
|
1
|
+
class QuerySaleRequest
|
2
|
+
attr_accessor :OrderKey
|
3
|
+
|
4
|
+
attr_accessor :OrderReference
|
5
|
+
|
6
|
+
attr_accessor :CreditCardTransactionKey
|
7
|
+
|
8
|
+
attr_accessor :CreditCardTransactionReference
|
9
|
+
|
10
|
+
attr_accessor :BoletoTransactionKey
|
11
|
+
|
12
|
+
attr_accessor :BoletoTransactionReference
|
13
|
+
|
14
|
+
attr_accessor :QuerySaleRequestEnum
|
15
|
+
|
16
|
+
# Enum feito para as chamadas do m�todo query
|
17
|
+
@@QuerySaleRequestEnum = {
|
18
|
+
:OrderKey => 'OrderKey',
|
19
|
+
:OrderReference => 'OrderReference',
|
20
|
+
:CreditCardTransactionKey => 'CreditCardTransactionKey',
|
21
|
+
:CreditCardTransactionReference => 'CreditCardTransactionReference',
|
22
|
+
:BoletoTransactionKey => 'BoletoTransactionKey',
|
23
|
+
:BoletoTransactionReference => 'BoletoTransactionReference'
|
24
|
+
}
|
25
|
+
|
26
|
+
def self.QuerySaleRequestEnum
|
27
|
+
@@QuerySaleRequestEnum
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_json
|
31
|
+
hash = {}
|
32
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
33
|
+
hash
|
34
|
+
end
|
35
|
+
|
36
36
|
end
|