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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -61
  3. data/lib/gateway/Address/billing_address.rb +32 -32
  4. data/lib/gateway/Address/buyer_address.rb +36 -36
  5. data/lib/gateway/Address/delivery_address.rb +32 -32
  6. data/lib/gateway/AntiFraud/anti_fraud_analysis_result.rb +47 -47
  7. data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_data.rb +51 -51
  8. data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_history_data.rb +41 -41
  9. data/lib/gateway/BaseRequest.rb +10 -10
  10. data/lib/gateway/BaseResponse.rb +17 -17
  11. data/lib/gateway/BoletoTransaction/boleto_transaction.rb +43 -43
  12. data/lib/gateway/BoletoTransaction/boleto_transaction_data.rb +43 -43
  13. data/lib/gateway/BoletoTransaction/boleto_transaction_options.rb +14 -14
  14. data/lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb +19 -19
  15. data/lib/gateway/BoletoTransaction/boleto_transaction_result.rb +34 -34
  16. data/lib/gateway/CreditCardTransaction/credit_card.rb +29 -29
  17. data/lib/gateway/CreditCardTransaction/credit_card_transaction.rb +31 -31
  18. data/lib/gateway/CreditCardTransaction/credit_card_transaction_data.rb +103 -103
  19. data/lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb +26 -26
  20. data/lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb +28 -28
  21. data/lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb +11 -11
  22. data/lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb +12 -12
  23. data/lib/gateway/ErrorItem.rb +17 -17
  24. data/lib/gateway/ErrorReport.rb +18 -18
  25. data/lib/gateway/Gateway.rb +441 -444
  26. data/lib/gateway/InstantBuy/credit_card_data.rb +40 -40
  27. data/lib/gateway/InstantBuy/get_instant_buy_data_response.rb +17 -17
  28. data/lib/gateway/Merchant/merchant.rb +10 -10
  29. data/lib/gateway/OnlineDebit/online_debit_transaction_report_file.rb +17 -17
  30. data/lib/gateway/Order/order.rb +10 -10
  31. data/lib/gateway/Order/order_transaction_report_file.rb +5 -5
  32. data/lib/gateway/Parsers/boleto_transaction_parser.rb +30 -30
  33. data/lib/gateway/Parsers/credit_card_transaction_parser.rb +39 -39
  34. data/lib/gateway/Parsers/header_parser.rb +13 -13
  35. data/lib/gateway/Parsers/online_debit_transaction_parser.rb +29 -29
  36. data/lib/gateway/Parsers/trailer_parser.rb +14 -14
  37. data/lib/gateway/Person/buyer.rb +32 -32
  38. data/lib/gateway/Person/person.rb +46 -46
  39. data/lib/gateway/Recurrency/recurrency.rb +22 -22
  40. data/lib/gateway/Sale/create_sale_request.rb +35 -35
  41. data/lib/gateway/Sale/create_sale_response.rb +24 -24
  42. data/lib/gateway/Sale/manage_sale_request.rb +16 -16
  43. data/lib/gateway/Sale/manage_sale_response.rb +14 -14
  44. data/lib/gateway/Sale/query_sale_request.rb +35 -35
  45. data/lib/gateway/Sale/query_sale_response.rb +17 -17
  46. data/lib/gateway/Sale/request_data.rb +19 -19
  47. data/lib/gateway/Sale/retry_sale_options.rb +13 -13
  48. data/lib/gateway/Sale/retry_sale_request.rb +21 -21
  49. data/lib/gateway/Sale/retry_sale_response.rb +13 -13
  50. data/lib/gateway/Sale/sale_data.rb +32 -32
  51. data/lib/gateway/Sale/sale_order_data.rb +16 -16
  52. data/lib/gateway/SalesOption.rb +17 -17
  53. data/lib/gateway/ShoppingCart/shopping_cart.rb +25 -25
  54. data/lib/gateway/ShoppingCart/shopping_cart_item.rb +22 -22
  55. data/lib/gateway/Trailer.rb +5 -5
  56. data/lib/gateway/address.rb +24 -24
  57. data/lib/gateway/header.rb +4 -4
  58. data/lib/gateway/post_notification.rb +28 -28
  59. data/lib/gateway/transaction_report_file.rb +44 -44
  60. data/lib/mundipagg_sdk.rb +70 -70
  61. data/mundipagg_sdk.gemspec +18 -18
  62. data/spec/integration/gateway_spec.rb +733 -651
  63. data/spec/integration/test_helper.rb +68 -68
  64. metadata +2 -2
@@ -1,30 +1,30 @@
1
- class CreditCard
2
-
3
- attr_accessor :InstantBuyKey
4
-
5
- attr_accessor :CreditCardNumber
6
-
7
- attr_accessor :HolderName
8
-
9
- attr_accessor :SecurityCode
10
-
11
- attr_accessor :ExpMonth
12
-
13
- attr_accessor :ExpYear
14
-
15
- attr_accessor :CreditCardBrand
16
-
17
- attr_accessor :BillingAddress
18
-
19
- def initialize
20
- @BillingAddress = BillingAddress.new
21
- end
22
-
23
- def to_json
24
- hash = {}
25
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
26
- hash
27
- end
28
-
29
-
1
+ class CreditCard
2
+
3
+ attr_accessor :InstantBuyKey
4
+
5
+ attr_accessor :CreditCardNumber
6
+
7
+ attr_accessor :HolderName
8
+
9
+ attr_accessor :SecurityCode
10
+
11
+ attr_accessor :ExpMonth
12
+
13
+ attr_accessor :ExpYear
14
+
15
+ attr_accessor :CreditCardBrand
16
+
17
+ attr_accessor :BillingAddress
18
+
19
+ def initialize
20
+ @BillingAddress = BillingAddress.new
21
+ end
22
+
23
+ def to_json
24
+ hash = {}
25
+ instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
26
+ hash
27
+ end
28
+
29
+
30
30
  end
@@ -1,32 +1,32 @@
1
- class CreditCardTransaction
2
-
3
- attr_accessor :CreditCard
4
-
5
- attr_accessor :Options
6
-
7
- attr_accessor :Recurrency
8
-
9
- attr_accessor :AmountInCents
10
-
11
- attr_accessor :InstallmentCount
12
-
13
- attr_accessor :CreditCardOperation
14
-
15
- attr_accessor :TransactionReference
16
-
17
- attr_accessor :TransactionDateInMerchant
18
-
19
-
20
- def initialize
21
- @Options = CreditCardTransactionOptions.new
22
- @Recurrency = Recurrency.new
23
- @CreditCard = CreditCard.new
24
- end
25
-
26
- def to_json
27
- hash = {}
28
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
29
- hash
30
- end
31
-
1
+ class CreditCardTransaction
2
+
3
+ attr_accessor :CreditCard
4
+
5
+ attr_accessor :Options
6
+
7
+ attr_accessor :Recurrency
8
+
9
+ attr_accessor :AmountInCents
10
+
11
+ attr_accessor :InstallmentCount
12
+
13
+ attr_accessor :CreditCardOperation
14
+
15
+ attr_accessor :TransactionReference
16
+
17
+ attr_accessor :TransactionDateInMerchant
18
+
19
+
20
+ def initialize
21
+ @Options = CreditCardTransactionOptions.new
22
+ @Recurrency = Recurrency.new
23
+ @CreditCard = CreditCard.new
24
+ end
25
+
26
+ def to_json
27
+ hash = {}
28
+ instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
29
+ hash
30
+ end
31
+
32
32
  end
@@ -1,104 +1,104 @@
1
- require_relative '../../gateway/InstantBuy/credit_card_data'
2
- class CreditCardTransactionData
3
- # Dados do cart�o de cr�dito
4
- attr_accessor :CreditCard
5
-
6
- # Status da transa��o de cart�o de cr�dito
7
- attr_accessor :CreditCardTransactionStatus
8
-
9
- @@CreditCardTransactionStatusEnum = {
10
- :AuthorizedPendingCapture => '1',
11
- :NotAuthorized => '2',
12
- :ChargebackPreview => '3',
13
- :RefundPreview => '4',
14
- :DepositPreview => '5',
15
- :Captured => '6',
16
- :PartialCapture => '7',
17
- :Refunded => '8',
18
- :Voided => '9',
19
- :Deposited => '10',
20
- :Chargeback => '12',
21
- :PendingVoid => '13',
22
- :Invalid => '14',
23
- :PartialAlthorize => '15',
24
- :PartialRefunded => '16',
25
- :OverCapture => '17',
26
- :PartialVoid => '18',
27
- :PendingRefund => '19',
28
- :UnScheduled => '20',
29
- :Created => '21',
30
- :PartialAuthorized => '22',
31
- :NotFoundInAcquirer => '23',
32
- :PendingAuthorize => '24',
33
- :WithError => '99'
34
- }
35
-
36
- # Chave da transa��o. Utilizada para identificar a transa��o de cart�o de cr�dito no gateway
37
- attr_accessor :TransactionKey
38
-
39
- # Identificador da transa��o gerado pela loja.
40
- attr_accessor :TransactionIdentifier
41
-
42
- # C�digo de autoriza��o retornado pela adquirente
43
- attr_accessor :AcquirerAuthorizationCode
44
-
45
- # Identificador �nico retornado pela adquirente
46
- attr_accessor :UniqueSequentialNumber
47
-
48
- # Valor original da transa��o em centavos
49
- attr_accessor :AmountInCents
50
-
51
- # Valor autorizado em centavos
52
- attr_accessor :AuthorizedAmountInCents
53
-
54
- # Valor capturado em centavos
55
- attr_accessor :CapturedAmountInCents
56
-
57
- # Valor estornado em centavos
58
- attr_accessor :RefundedAmountInCents
59
-
60
- # Valor cancelado em centavos
61
- attr_accessor :VoidedAmountInCents
62
-
63
- # Data da recorr�ncia (poder� ser futura)
64
- attr_accessor :DueDate
65
-
66
- # Identificador da transa��o no sistema da loja
67
- attr_accessor :TransactionReference
68
-
69
- # Data de cria��o da transa��o no gatewaya
70
- attr_accessor :CreateDate
71
-
72
- # Nome da adquirente que processou a transa��o
73
- attr_accessor :AcquirerName
74
-
75
- # Indica se � uma recorr�ncia
76
- attr_accessor :IsRecurrency
77
-
78
- # Total de parcelas na transa��o
79
- attr_accessor :InstallmentCount
80
-
81
- # C�digo de filia��o da loja na adquirente
82
- attr_accessor :AffiliationCode
83
-
84
- # C�digo do m�todo de pagamento
85
- attr_accessor :PaymentMethodName
86
-
87
- # Chave da transa��o na adquirente, enviada pelo gateway
88
- attr_accessor :TransactionKeyToAcquirer
89
-
90
- # Data limite para a captura da transa��o na adquirente
91
- attr_accessor :CaptureExpirationDate
92
-
93
- def initialize
94
- @CreditCard = CreditCardData.new
95
- @CreditCardTransactionStatus = self.CreditCardTransactionStatusEnum
96
- end
97
-
98
- def to_json
99
- hash = {}
100
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
101
- hash
102
- end
103
-
1
+ require_relative '../../gateway/InstantBuy/credit_card_data'
2
+ class CreditCardTransactionData
3
+ # Dados do cart�o de cr�dito
4
+ attr_accessor :CreditCard
5
+
6
+ # Status da transa��o de cart�o de cr�dito
7
+ attr_accessor :CreditCardTransactionStatus
8
+
9
+ @@CreditCardTransactionStatusEnum = {
10
+ :AuthorizedPendingCapture => '1',
11
+ :NotAuthorized => '2',
12
+ :ChargebackPreview => '3',
13
+ :RefundPreview => '4',
14
+ :DepositPreview => '5',
15
+ :Captured => '6',
16
+ :PartialCapture => '7',
17
+ :Refunded => '8',
18
+ :Voided => '9',
19
+ :Deposited => '10',
20
+ :Chargeback => '12',
21
+ :PendingVoid => '13',
22
+ :Invalid => '14',
23
+ :PartialAlthorize => '15',
24
+ :PartialRefunded => '16',
25
+ :OverCapture => '17',
26
+ :PartialVoid => '18',
27
+ :PendingRefund => '19',
28
+ :UnScheduled => '20',
29
+ :Created => '21',
30
+ :PartialAuthorized => '22',
31
+ :NotFoundInAcquirer => '23',
32
+ :PendingAuthorize => '24',
33
+ :WithError => '99'
34
+ }
35
+
36
+ # Chave da transa��o. Utilizada para identificar a transa��o de cart�o de cr�dito no gateway
37
+ attr_accessor :TransactionKey
38
+
39
+ # Identificador da transa��o gerado pela loja.
40
+ attr_accessor :TransactionIdentifier
41
+
42
+ # C�digo de autoriza��o retornado pela adquirente
43
+ attr_accessor :AcquirerAuthorizationCode
44
+
45
+ # Identificador �nico retornado pela adquirente
46
+ attr_accessor :UniqueSequentialNumber
47
+
48
+ # Valor original da transa��o em centavos
49
+ attr_accessor :AmountInCents
50
+
51
+ # Valor autorizado em centavos
52
+ attr_accessor :AuthorizedAmountInCents
53
+
54
+ # Valor capturado em centavos
55
+ attr_accessor :CapturedAmountInCents
56
+
57
+ # Valor estornado em centavos
58
+ attr_accessor :RefundedAmountInCents
59
+
60
+ # Valor cancelado em centavos
61
+ attr_accessor :VoidedAmountInCents
62
+
63
+ # Data da recorr�ncia (poder� ser futura)
64
+ attr_accessor :DueDate
65
+
66
+ # Identificador da transa��o no sistema da loja
67
+ attr_accessor :TransactionReference
68
+
69
+ # Data de cria��o da transa��o no gatewaya
70
+ attr_accessor :CreateDate
71
+
72
+ # Nome da adquirente que processou a transa��o
73
+ attr_accessor :AcquirerName
74
+
75
+ # Indica se � uma recorr�ncia
76
+ attr_accessor :IsRecurrency
77
+
78
+ # Total de parcelas na transa��o
79
+ attr_accessor :InstallmentCount
80
+
81
+ # C�digo de filia��o da loja na adquirente
82
+ attr_accessor :AffiliationCode
83
+
84
+ # C�digo do m�todo de pagamento
85
+ attr_accessor :PaymentMethodName
86
+
87
+ # Chave da transa��o na adquirente, enviada pelo gateway
88
+ attr_accessor :TransactionKeyToAcquirer
89
+
90
+ # Data limite para a captura da transa��o na adquirente
91
+ attr_accessor :CaptureExpirationDate
92
+
93
+ def initialize
94
+ @CreditCard = CreditCardData.new
95
+ @CreditCardTransactionStatus = self.CreditCardTransactionStatusEnum
96
+ end
97
+
98
+ def to_json
99
+ hash = {}
100
+ instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
101
+ hash
102
+ end
103
+
104
104
  end
@@ -1,27 +1,27 @@
1
- class CreditCardTransactionOptions
2
-
3
- attr_accessor :PaymentMethodCode
4
-
5
- attr_accessor :CurrencyIso
6
-
7
- attr_accessor :IataAmountInCents
8
-
9
- attr_accessor :CaptureDelayInMinutes
10
-
11
- attr_accessor :MerchantCategoryCode
12
-
13
- attr_accessor :SoftDescriptorText
14
-
15
- attr_accessor :InterestRate
16
-
17
- attr_accessor :ExtendedLimitEnabled
18
-
19
- attr_accessor :ExtendedLimitCode
20
-
21
- def to_json
22
- hash = {}
23
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
24
- hash
25
- end
26
-
1
+ class CreditCardTransactionOptions
2
+
3
+ attr_accessor :PaymentMethodCode
4
+
5
+ attr_accessor :CurrencyIso
6
+
7
+ attr_accessor :IataAmountInCents
8
+
9
+ attr_accessor :CaptureDelayInMinutes
10
+
11
+ attr_accessor :MerchantCategoryCode
12
+
13
+ attr_accessor :SoftDescriptorText
14
+
15
+ attr_accessor :InterestRate
16
+
17
+ attr_accessor :ExtendedLimitEnabled
18
+
19
+ attr_accessor :ExtendedLimitCode
20
+
21
+ def to_json
22
+ hash = {}
23
+ instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
24
+ hash
25
+ end
26
+
27
27
  end
@@ -1,29 +1,29 @@
1
- class CreditCardTransactionReportFile
2
- attr_accessor :Order
3
- attr_accessor :TransactionKey
4
- attr_accessor :TransactionKeyToAcquirer
5
- attr_accessor :CreditCardTransactionReference
6
- attr_accessor :CreditCardBrand
7
- attr_accessor :CreditCardNumber
8
- attr_accessor :InstallmentCount
9
- attr_accessor :AcquirerName
10
- attr_accessor :Status
11
- attr_accessor :AmountInCents
12
- attr_accessor :IataAmountInCents
13
- attr_accessor :AuthorizationCode
14
- attr_accessor :TransactionIdentifier
15
- attr_accessor :UniqueSequentialNumber
16
- attr_accessor :AuthorizedAmountInCents
17
- attr_accessor :CapturedAmountInCents
18
- attr_accessor :VoidedAmountInCents
19
- attr_accessor :RefundedAmountInCents
20
- attr_accessor :AcquirerAuthorizationReturnCode
21
- attr_accessor :AuthorizedDate
22
- attr_accessor :CapturedDate
23
- attr_accessor :VoidedDate
24
- attr_accessor :LastProbeDate
25
-
26
- def initialize
27
- @Order = OrderTransactionReportFile.new
28
- end
1
+ class CreditCardTransactionReportFile
2
+ attr_accessor :Order
3
+ attr_accessor :TransactionKey
4
+ attr_accessor :TransactionKeyToAcquirer
5
+ attr_accessor :CreditCardTransactionReference
6
+ attr_accessor :CreditCardBrand
7
+ attr_accessor :CreditCardNumber
8
+ attr_accessor :InstallmentCount
9
+ attr_accessor :AcquirerName
10
+ attr_accessor :Status
11
+ attr_accessor :AmountInCents
12
+ attr_accessor :IataAmountInCents
13
+ attr_accessor :AuthorizationCode
14
+ attr_accessor :TransactionIdentifier
15
+ attr_accessor :UniqueSequentialNumber
16
+ attr_accessor :AuthorizedAmountInCents
17
+ attr_accessor :CapturedAmountInCents
18
+ attr_accessor :VoidedAmountInCents
19
+ attr_accessor :RefundedAmountInCents
20
+ attr_accessor :AcquirerAuthorizationReturnCode
21
+ attr_accessor :AuthorizedDate
22
+ attr_accessor :CapturedDate
23
+ attr_accessor :VoidedDate
24
+ attr_accessor :LastProbeDate
25
+
26
+ def initialize
27
+ @Order = OrderTransactionReportFile.new
28
+ end
29
29
  end
@@ -1,12 +1,12 @@
1
- # classe para usar nos metodos de cancel e capture
2
- class ManageCreditCardTransaction
3
- attr_accessor :AmountInCents
4
- attr_accessor :TransactionKey
5
- attr_accessor :TransactionReference
6
-
7
- def to_json
8
- hash = {}
9
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
10
- hash
11
- end
1
+ # classe para usar nos metodos de cancel e capture
2
+ class ManageCreditCardTransaction
3
+ attr_accessor :AmountInCents
4
+ attr_accessor :TransactionKey
5
+ attr_accessor :TransactionReference
6
+
7
+ def to_json
8
+ hash = {}
9
+ instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
10
+ hash
11
+ end
12
12
  end