mundipagg_sdk 1.0.3 → 1.2.3rc

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -61
  3. data/lib/gateway/Address/billing_address.rb +34 -32
  4. data/lib/gateway/Address/buyer_address.rb +39 -36
  5. data/lib/gateway/Address/delivery_address.rb +34 -32
  6. data/lib/gateway/BoletoTransaction/boleto_transaction.rb +41 -43
  7. data/lib/gateway/BoletoTransaction/boleto_transaction_options.rb +17 -14
  8. data/lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb +22 -19
  9. data/lib/gateway/CreditCardTransaction/credit_card.rb +30 -29
  10. data/lib/gateway/CreditCardTransaction/credit_card_transaction.rb +33 -31
  11. data/lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb +28 -26
  12. data/lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb +31 -28
  13. data/lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb +14 -11
  14. data/lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb +14 -12
  15. data/lib/gateway/Gateway.rb +621 -441
  16. data/lib/gateway/InstantBuyData/create_instant_buy_data_request.rb +31 -0
  17. data/lib/gateway/InstantBuyData/update_instant_buy_data_request.rb +11 -0
  18. data/lib/gateway/Merchant/merchant.rb +12 -10
  19. data/lib/gateway/OnlineDebit/online_debit_transaction_report_file.rb +21 -18
  20. data/lib/gateway/Order/order.rb +13 -10
  21. data/lib/gateway/Order/order_transaction_report_file.rb +8 -5
  22. data/lib/gateway/Parsers/boleto_transaction_parser.rb +33 -30
  23. data/lib/gateway/Parsers/credit_card_transaction_parser.rb +42 -39
  24. data/lib/gateway/Parsers/header_parser.rb +16 -13
  25. data/lib/gateway/Parsers/online_debit_transaction_parser.rb +32 -29
  26. data/lib/gateway/Parsers/trailer_parser.rb +16 -14
  27. data/lib/gateway/Person/buyer.rb +32 -32
  28. data/lib/gateway/Person/create_buyer_request.rb +23 -0
  29. data/lib/gateway/Person/person.rb +48 -46
  30. data/lib/gateway/Recurrency/recurrency.rb +24 -22
  31. data/lib/gateway/Sale/create_sale_request.rb +37 -35
  32. data/lib/gateway/Sale/manage_sale_request.rb +18 -16
  33. data/lib/gateway/Sale/query_sale_request.rb +37 -35
  34. data/lib/gateway/Sale/request_data.rb +21 -19
  35. data/lib/gateway/Sale/retry_sale_options.rb +15 -13
  36. data/lib/gateway/Sale/retry_sale_request.rb +23 -22
  37. data/lib/gateway/Sale/sale_data.rb +30 -32
  38. data/lib/gateway/Sale/sale_order_data.rb +18 -16
  39. data/lib/gateway/SalesOption.rb +19 -17
  40. data/lib/gateway/ShoppingCart/shopping_cart.rb +27 -25
  41. data/lib/gateway/ShoppingCart/shopping_cart_item.rb +24 -22
  42. data/lib/gateway/Trailer.rb +8 -5
  43. data/lib/gateway/header.rb +7 -4
  44. data/lib/gateway/post_notification.rb +31 -28
  45. data/lib/gateway/transaction_report_file.rb +47 -44
  46. data/lib/mundipagg_sdk.rb +62 -70
  47. data/mundipagg_sdk.gemspec +19 -19
  48. data/spec/integration/gateway_spec.rb +1022 -733
  49. data/spec/integration/test_helper.rb +68 -68
  50. metadata +7 -21
  51. data/lib/gateway/AntiFraud/anti_fraud_analysis_result.rb +0 -47
  52. data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_data.rb +0 -51
  53. data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_history_data.rb +0 -41
  54. data/lib/gateway/BaseRequest.rb +0 -11
  55. data/lib/gateway/BaseResponse.rb +0 -17
  56. data/lib/gateway/BoletoTransaction/boleto_transaction_data.rb +0 -44
  57. data/lib/gateway/BoletoTransaction/boleto_transaction_result.rb +0 -35
  58. data/lib/gateway/CreditCardTransaction/credit_card_transaction_data.rb +0 -104
  59. data/lib/gateway/ErrorItem.rb +0 -17
  60. data/lib/gateway/ErrorReport.rb +0 -18
  61. data/lib/gateway/InstantBuy/credit_card_data.rb +0 -41
  62. data/lib/gateway/InstantBuy/get_instant_buy_data_response.rb +0 -18
  63. data/lib/gateway/Sale/create_sale_response.rb +0 -25
  64. data/lib/gateway/Sale/manage_sale_response.rb +0 -15
  65. data/lib/gateway/Sale/query_sale_response.rb +0 -18
  66. data/lib/gateway/Sale/retry_sale_response.rb +0 -14
  67. data/lib/gateway/address.rb +0 -25
@@ -1,104 +0,0 @@
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
- end
@@ -1,17 +0,0 @@
1
- class ErrorItem
2
-
3
- attr_accessor :ErrorCode
4
-
5
- attr_accessor :ErrorField
6
-
7
- attr_accessor :Description
8
-
9
- attr_accessor :SeverityCode
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
- end
@@ -1,18 +0,0 @@
1
- class ErrorReport
2
-
3
- attr_accessor :Category
4
-
5
- attr_accessor :ErrorItemCollection
6
-
7
-
8
- def initialize
9
- @ErrorItemCollection = Array.new;
10
- end
11
-
12
- def to_json
13
- hash = {}
14
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
15
- hash
16
- end
17
-
18
- end
@@ -1,41 +0,0 @@
1
- class CreditCardData
2
- # N�mero mascardo do cart�o de cr�dito
3
- attr_accessor :MaskedCreditCardNumber
4
-
5
- # Bandeira do cart�o de cr�dito
6
- attr_accessor :CreditCardBrand
7
-
8
- @@CreditCardBrandEnum = {
9
- :Visa => '1',
10
- :MasterCard => '2',
11
- :HiperCard => '3',
12
- :Amex => '4',
13
- :Diners => '5',
14
- :Elo => '6',
15
- :Aura => '7',
16
- :Discover => '8',
17
- :CasaShow => '9',
18
- :Havan => '10',
19
- :HugCard => '11',
20
- :AndarAki => '12',
21
- :LeaderCard => '13',
22
- :Submarino => '14'
23
- }
24
-
25
- # Chave do cart�o de cr�dito. Utilizada para identificar um cart�o de cr�dito no gateway
26
- attr_accessor :InstantBuyerKey
27
-
28
- # Informa se o cart�o de cr�dito expirou
29
- attr_accessor :IsExpiredCreditCard
30
-
31
- def initialize
32
- @CreditCardBrand = self.CreditCardBrandEnum
33
- end
34
-
35
- def to_json
36
- hash = {}
37
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
38
- hash
39
- end
40
-
41
- end
@@ -1,18 +0,0 @@
1
- class GetInstantBuyDataResponse
2
- # Lista de cart�es de cr�dito
3
- attr_accessor :CreditCardDataCollection
4
-
5
- # Total de cart�es de cr�dito retornados
6
- attr_accessor :CreditCardDataCount
7
-
8
- def initialize
9
- @CreditCardDataCollection = Array.new
10
- end
11
-
12
- def to_json
13
- hash = {}
14
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
15
- hash
16
- end
17
-
18
- end
@@ -1,25 +0,0 @@
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
- end
@@ -1,15 +0,0 @@
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
- end
@@ -1,18 +0,0 @@
1
- class QuerySaleResponse
2
- # Lista de vendas
3
- attr_accessor :SaleDataCollection
4
-
5
- # Indicador do total de vendas
6
- attr_accessor :SaleDataCount
7
-
8
- def initialize
9
- @SaleDataCollection = Array.new
10
- end
11
-
12
- def to_json
13
- hash = {}
14
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
15
- hash
16
- end
17
-
18
- end
@@ -1,14 +0,0 @@
1
- class RetrySaleResponse
2
- attr_accessor :CreditCardTransactionResultCollection
3
-
4
- def initialize
5
- @CreditCardTransactionResultCollection = Array.new
6
- end
7
-
8
- def to_json
9
- hash = {}
10
- instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
11
- hash
12
- end
13
-
14
- end
@@ -1,25 +0,0 @@
1
- class Address
2
-
3
- attr_accessor :Country
4
-
5
- attr_accessor :State
6
-
7
- attr_accessor :City
8
-
9
- attr_accessor :District
10
-
11
- attr_accessor :Street
12
-
13
- attr_accessor :Number
14
-
15
- attr_accessor :Complement
16
-
17
- attr_accessor :ZipCode
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
- end