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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 214b67422e539d2bf53e8a8a1713aa634e05bea9
|
4
|
+
data.tar.gz: 6a2a14ea305c418fd5588881624fed17d032f2e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b36c71b7ea2b6b70fb961d6d1c3ad05dc424419a026763659b17bba2531593886a59ef98453489be4c1a27e4a2a78ca3540c6e5fa2e5511ec28e6ebe7bc338f5
|
7
|
+
data.tar.gz: 09ea69d0db4b8fe02884f18cdde35bf35bf026c8aa4a7df6b8792f58c2a564ce137f687422ecddc27f3ea39e079c481ad2f228e8a51a227c8e2874728b0a6592
|
data/README.md
CHANGED
@@ -1,61 +1,61 @@
|
|
1
|
-
# mundipagg-one-ruby [](https://travis-ci.org/mundipagg/mundipagg-one-ruby)
|
2
|
-
|
3
|
-
### Mundipagg Gem Download
|
4
|
-
https://rubygems.org/gems/mundipagg_sdk
|
5
|
-
|
6
|
-
```ruby
|
7
|
-
$ gem install mundipagg_sdk
|
8
|
-
```
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
require 'mundipagg_sdk'
|
12
|
-
```
|
13
|
-
|
14
|
-
Ruby DevKit is required.
|
15
|
-
|
16
|
-
### About Windows
|
17
|
-
The recommended Windows version of Ruby is Ruby 2.1.
|
18
|
-
For gems work correctly it'll be necessary run the following commands:
|
19
|
-
|
20
|
-
```ruby
|
21
|
-
$ gem install rubygems-update
|
22
|
-
$ update_rubygems
|
23
|
-
$ gem update --system
|
24
|
-
```
|
25
|
-
### Required Gems
|
26
|
-
```ruby
|
27
|
-
$ gem install rest-client
|
28
|
-
$ gem install rspec
|
29
|
-
$ gem install nori
|
30
|
-
$ gem install gyoku
|
31
|
-
$ gem install nokogiri
|
32
|
-
$ gem install ffi
|
33
|
-
$ gem install bundler
|
34
|
-
```
|
35
|
-
### Bundler
|
36
|
-
Run the following commands to install gems:
|
37
|
-
|
38
|
-
Rode os seguintes comandos para instalar as gems:
|
39
|
-
```ruby
|
40
|
-
$ gem install bundler
|
41
|
-
$ bundle install
|
42
|
-
```
|
43
|
-
|
44
|
-
Running tests with `bundle exec`:
|
45
|
-
|
46
|
-
Rodando testes com `bundle exec`:
|
47
|
-
```ruby
|
48
|
-
$ bundle exec rspec spec/integration/gateway_spec.rb
|
49
|
-
```
|
50
|
-
|
51
|
-
Running tests with `rake`:
|
52
|
-
|
53
|
-
Rodando testes com `rake`:
|
54
|
-
|
55
|
-
```ruby
|
56
|
-
$ rake
|
57
|
-
```
|
58
|
-
|
59
|
-
## Code Examples
|
60
|
-
|
61
|
-
You can access all the code examples [HERE, the Wiki page!](https://github.com/mundipagg/mundipagg-one-ruby/wiki)
|
1
|
+
# mundipagg-one-ruby [](https://travis-ci.org/mundipagg/mundipagg-one-ruby)
|
2
|
+
|
3
|
+
### Mundipagg Gem Download
|
4
|
+
https://rubygems.org/gems/mundipagg_sdk
|
5
|
+
|
6
|
+
```ruby
|
7
|
+
$ gem install mundipagg_sdk
|
8
|
+
```
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'mundipagg_sdk'
|
12
|
+
```
|
13
|
+
|
14
|
+
Ruby DevKit is required.
|
15
|
+
|
16
|
+
### About Windows
|
17
|
+
The recommended Windows version of Ruby is Ruby 2.1.
|
18
|
+
For gems work correctly it'll be necessary run the following commands:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
$ gem install rubygems-update
|
22
|
+
$ update_rubygems
|
23
|
+
$ gem update --system
|
24
|
+
```
|
25
|
+
### Required Gems
|
26
|
+
```ruby
|
27
|
+
$ gem install rest-client
|
28
|
+
$ gem install rspec
|
29
|
+
$ gem install nori
|
30
|
+
$ gem install gyoku
|
31
|
+
$ gem install nokogiri
|
32
|
+
$ gem install ffi
|
33
|
+
$ gem install bundler
|
34
|
+
```
|
35
|
+
### Bundler
|
36
|
+
Run the following commands to install gems:
|
37
|
+
|
38
|
+
Rode os seguintes comandos para instalar as gems:
|
39
|
+
```ruby
|
40
|
+
$ gem install bundler
|
41
|
+
$ bundle install
|
42
|
+
```
|
43
|
+
|
44
|
+
Running tests with `bundle exec`:
|
45
|
+
|
46
|
+
Rodando testes com `bundle exec`:
|
47
|
+
```ruby
|
48
|
+
$ bundle exec rspec spec/integration/gateway_spec.rb
|
49
|
+
```
|
50
|
+
|
51
|
+
Running tests with `rake`:
|
52
|
+
|
53
|
+
Rodando testes com `rake`:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
$ rake
|
57
|
+
```
|
58
|
+
|
59
|
+
## Code Examples
|
60
|
+
|
61
|
+
You can access all the code examples [HERE, the Wiki page!](https://github.com/mundipagg/mundipagg-one-ruby/wiki)
|
@@ -1,32 +1,32 @@
|
|
1
|
-
class BillingAddress
|
2
|
-
# País. Opções: Brazil, USA, Argentina, Bolivia, Chile, Colombia, Uruguay, Mexico, Paraguay
|
3
|
-
attr_accessor :Country
|
4
|
-
|
5
|
-
# Estado
|
6
|
-
attr_accessor :State
|
7
|
-
|
8
|
-
# Cidade
|
9
|
-
attr_accessor :City
|
10
|
-
|
11
|
-
# Distrito
|
12
|
-
attr_accessor :District
|
13
|
-
|
14
|
-
# Logradouro
|
15
|
-
attr_accessor :Street
|
16
|
-
|
17
|
-
# Número
|
18
|
-
attr_accessor :Number
|
19
|
-
|
20
|
-
# Complemento
|
21
|
-
attr_accessor :Complement
|
22
|
-
|
23
|
-
# CEP
|
24
|
-
attr_accessor :ZipCode
|
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
|
-
end
|
1
|
+
class BillingAddress
|
2
|
+
# País. Opções: Brazil, USA, Argentina, Bolivia, Chile, Colombia, Uruguay, Mexico, Paraguay
|
3
|
+
attr_accessor :Country
|
4
|
+
|
5
|
+
# Estado
|
6
|
+
attr_accessor :State
|
7
|
+
|
8
|
+
# Cidade
|
9
|
+
attr_accessor :City
|
10
|
+
|
11
|
+
# Distrito
|
12
|
+
attr_accessor :District
|
13
|
+
|
14
|
+
# Logradouro
|
15
|
+
attr_accessor :Street
|
16
|
+
|
17
|
+
# Número
|
18
|
+
attr_accessor :Number
|
19
|
+
|
20
|
+
# Complemento
|
21
|
+
attr_accessor :Complement
|
22
|
+
|
23
|
+
# CEP
|
24
|
+
attr_accessor :ZipCode
|
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
|
+
end
|
@@ -1,36 +1,36 @@
|
|
1
|
-
class BuyerAddress
|
2
|
-
# País. Opções: Brazil, USA, Argentina, Bolivia, Chile, Colombia, Uruguay, Mexico, Paraguay
|
3
|
-
attr_accessor :Country
|
4
|
-
|
5
|
-
# Estado
|
6
|
-
attr_accessor :State
|
7
|
-
|
8
|
-
# Cidade
|
9
|
-
attr_accessor :City
|
10
|
-
|
11
|
-
# Distrito
|
12
|
-
attr_accessor :District
|
13
|
-
|
14
|
-
# Logradouro
|
15
|
-
attr_accessor :Street
|
16
|
-
|
17
|
-
# Número
|
18
|
-
attr_accessor :Number
|
19
|
-
|
20
|
-
# Complemento
|
21
|
-
attr_accessor :Complement
|
22
|
-
|
23
|
-
# CEP
|
24
|
-
attr_accessor :ZipCode
|
25
|
-
|
26
|
-
# Tipo de endereço
|
27
|
-
attr_accessor :AddressType
|
28
|
-
|
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
|
-
end
|
1
|
+
class BuyerAddress
|
2
|
+
# País. Opções: Brazil, USA, Argentina, Bolivia, Chile, Colombia, Uruguay, Mexico, Paraguay
|
3
|
+
attr_accessor :Country
|
4
|
+
|
5
|
+
# Estado
|
6
|
+
attr_accessor :State
|
7
|
+
|
8
|
+
# Cidade
|
9
|
+
attr_accessor :City
|
10
|
+
|
11
|
+
# Distrito
|
12
|
+
attr_accessor :District
|
13
|
+
|
14
|
+
# Logradouro
|
15
|
+
attr_accessor :Street
|
16
|
+
|
17
|
+
# Número
|
18
|
+
attr_accessor :Number
|
19
|
+
|
20
|
+
# Complemento
|
21
|
+
attr_accessor :Complement
|
22
|
+
|
23
|
+
# CEP
|
24
|
+
attr_accessor :ZipCode
|
25
|
+
|
26
|
+
# Tipo de endereço
|
27
|
+
attr_accessor :AddressType
|
28
|
+
|
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
|
+
end
|
@@ -1,32 +1,32 @@
|
|
1
|
-
class DeliveryAddress
|
2
|
-
# País. Opções: Brazil, USA, Argentina, Bolivia, Chile, Colombia, Uruguay, Mexico, Paraguay
|
3
|
-
attr_accessor :Country
|
4
|
-
|
5
|
-
# Estado
|
6
|
-
attr_accessor :State
|
7
|
-
|
8
|
-
# Cidade
|
9
|
-
attr_accessor :City
|
10
|
-
|
11
|
-
# Distrito
|
12
|
-
attr_accessor :District
|
13
|
-
|
14
|
-
# Logradouro
|
15
|
-
attr_accessor :Street
|
16
|
-
|
17
|
-
# Número
|
18
|
-
attr_accessor :Number
|
19
|
-
|
20
|
-
# Complemento
|
21
|
-
attr_accessor :Complement
|
22
|
-
|
23
|
-
# zip code
|
24
|
-
attr_accessor :ZipCode
|
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
|
-
end
|
1
|
+
class DeliveryAddress
|
2
|
+
# País. Opções: Brazil, USA, Argentina, Bolivia, Chile, Colombia, Uruguay, Mexico, Paraguay
|
3
|
+
attr_accessor :Country
|
4
|
+
|
5
|
+
# Estado
|
6
|
+
attr_accessor :State
|
7
|
+
|
8
|
+
# Cidade
|
9
|
+
attr_accessor :City
|
10
|
+
|
11
|
+
# Distrito
|
12
|
+
attr_accessor :District
|
13
|
+
|
14
|
+
# Logradouro
|
15
|
+
attr_accessor :Street
|
16
|
+
|
17
|
+
# Número
|
18
|
+
attr_accessor :Number
|
19
|
+
|
20
|
+
# Complemento
|
21
|
+
attr_accessor :Complement
|
22
|
+
|
23
|
+
# zip code
|
24
|
+
attr_accessor :ZipCode
|
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
|
+
end
|
@@ -1,47 +1,47 @@
|
|
1
|
-
class AntiFraudAnalysisResult
|
2
|
-
# Indica se a análise de antifraude está habilitada
|
3
|
-
attr_accessor :IsAntiFraudEnabled
|
4
|
-
|
5
|
-
# Código do serviço de antifraude
|
6
|
-
attr_accessor :AntiFraudServiceCode
|
7
|
-
|
8
|
-
# Status da análise do serviço de antifraude
|
9
|
-
attr_accessor :AntiFraudAnalysisStatus
|
10
|
-
|
11
|
-
# Código de retorno do antifraude
|
12
|
-
attr_accessor :ReturnCode
|
13
|
-
|
14
|
-
# Status de retorno do antifraude
|
15
|
-
attr_accessor :ReturnStatus
|
16
|
-
|
17
|
-
# Mensagem de retorno do antifraude
|
18
|
-
attr_accessor :Message
|
19
|
-
|
20
|
-
# Pontuação do pedido
|
21
|
-
attr_accessor :Score
|
22
|
-
|
23
|
-
# Nome do serviço de antifraude
|
24
|
-
attr_accessor :AntiFraudServiceName
|
25
|
-
|
26
|
-
@@AntiFraudAnalysisStatusEnum = {
|
27
|
-
:Undefined => '0',
|
28
|
-
:PendingFraudAnalysisRequirement => '1',
|
29
|
-
:FraudAnalysisRequirementSent => '2',
|
30
|
-
:Approved => '3',
|
31
|
-
:Reproved => '4',
|
32
|
-
:PendingManualAnalysis => '5',
|
33
|
-
:NoTransactionToAnalyse => '6',
|
34
|
-
:FraudAnalysisWithError => '7'
|
35
|
-
}
|
36
|
-
|
37
|
-
def initialize
|
38
|
-
@AntiFraudAnalysisStatus = self.AntiFraudAnalysisStatusEnum
|
39
|
-
end
|
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
|
-
end
|
1
|
+
class AntiFraudAnalysisResult
|
2
|
+
# Indica se a análise de antifraude está habilitada
|
3
|
+
attr_accessor :IsAntiFraudEnabled
|
4
|
+
|
5
|
+
# Código do serviço de antifraude
|
6
|
+
attr_accessor :AntiFraudServiceCode
|
7
|
+
|
8
|
+
# Status da análise do serviço de antifraude
|
9
|
+
attr_accessor :AntiFraudAnalysisStatus
|
10
|
+
|
11
|
+
# Código de retorno do antifraude
|
12
|
+
attr_accessor :ReturnCode
|
13
|
+
|
14
|
+
# Status de retorno do antifraude
|
15
|
+
attr_accessor :ReturnStatus
|
16
|
+
|
17
|
+
# Mensagem de retorno do antifraude
|
18
|
+
attr_accessor :Message
|
19
|
+
|
20
|
+
# Pontuação do pedido
|
21
|
+
attr_accessor :Score
|
22
|
+
|
23
|
+
# Nome do serviço de antifraude
|
24
|
+
attr_accessor :AntiFraudServiceName
|
25
|
+
|
26
|
+
@@AntiFraudAnalysisStatusEnum = {
|
27
|
+
:Undefined => '0',
|
28
|
+
:PendingFraudAnalysisRequirement => '1',
|
29
|
+
:FraudAnalysisRequirementSent => '2',
|
30
|
+
:Approved => '3',
|
31
|
+
:Reproved => '4',
|
32
|
+
:PendingManualAnalysis => '5',
|
33
|
+
:NoTransactionToAnalyse => '6',
|
34
|
+
:FraudAnalysisWithError => '7'
|
35
|
+
}
|
36
|
+
|
37
|
+
def initialize
|
38
|
+
@AntiFraudAnalysisStatus = self.AntiFraudAnalysisStatusEnum
|
39
|
+
end
|
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
|
+
end
|
@@ -1,51 +1,51 @@
|
|
1
|
-
class QuerySaleAntiFraudAnalysisData
|
2
|
-
# Indica se o serviço de antifraude está habilitado
|
3
|
-
attr_accessor :IsAntiFraudEnabled
|
4
|
-
|
5
|
-
# Código do serviço de antifraude
|
6
|
-
attr_accessor :AntiFraudServiceCode
|
7
|
-
|
8
|
-
# Nome do serviço de antifraude
|
9
|
-
attr_accessor :AntiFraudServiceName
|
10
|
-
|
11
|
-
# Status da análise de antifraude
|
12
|
-
attr_accessor :AntiFraudAnalysisStatus
|
13
|
-
|
14
|
-
@@AntiFraudAnalysisStatus = {
|
15
|
-
:Undefined => '0',
|
16
|
-
:PendingFraudAnalysisRequirement => '1',
|
17
|
-
:FraudAnalysisRequirementSent => '2',
|
18
|
-
:Approved => '3',
|
19
|
-
:Reproved => '4',
|
20
|
-
:PendingManualAnalysis => '5',
|
21
|
-
:NoTransactionToAnalyse => '6',
|
22
|
-
:FraudAnalysisWithError => '7'
|
23
|
-
}
|
24
|
-
|
25
|
-
# Código de retorno do serviço de antifraude
|
26
|
-
attr_accessor :ReturnCode
|
27
|
-
|
28
|
-
# Status do retorno do antifraude
|
29
|
-
attr_accessor :ReturnStatus
|
30
|
-
|
31
|
-
# Mensagem de retorno do antifraude
|
32
|
-
attr_accessor :ReturnMessage
|
33
|
-
|
34
|
-
# Pontuação do comprador
|
35
|
-
attr_accessor :Score
|
36
|
-
|
37
|
-
# Histórico da análise de antifraude
|
38
|
-
attr_accessor :HistoryCollection
|
39
|
-
|
40
|
-
def initialize
|
41
|
-
@AntiFraudAnalysisStatus = self.AntiFraudAnalysisStatusEnum
|
42
|
-
@HistoryCollection = QuerySaleAntiFraudAnalysisHistoryData.new
|
43
|
-
end
|
44
|
-
|
45
|
-
def to_json
|
46
|
-
hash = {}
|
47
|
-
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
48
|
-
hash
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
1
|
+
class QuerySaleAntiFraudAnalysisData
|
2
|
+
# Indica se o serviço de antifraude está habilitado
|
3
|
+
attr_accessor :IsAntiFraudEnabled
|
4
|
+
|
5
|
+
# Código do serviço de antifraude
|
6
|
+
attr_accessor :AntiFraudServiceCode
|
7
|
+
|
8
|
+
# Nome do serviço de antifraude
|
9
|
+
attr_accessor :AntiFraudServiceName
|
10
|
+
|
11
|
+
# Status da análise de antifraude
|
12
|
+
attr_accessor :AntiFraudAnalysisStatus
|
13
|
+
|
14
|
+
@@AntiFraudAnalysisStatus = {
|
15
|
+
:Undefined => '0',
|
16
|
+
:PendingFraudAnalysisRequirement => '1',
|
17
|
+
:FraudAnalysisRequirementSent => '2',
|
18
|
+
:Approved => '3',
|
19
|
+
:Reproved => '4',
|
20
|
+
:PendingManualAnalysis => '5',
|
21
|
+
:NoTransactionToAnalyse => '6',
|
22
|
+
:FraudAnalysisWithError => '7'
|
23
|
+
}
|
24
|
+
|
25
|
+
# Código de retorno do serviço de antifraude
|
26
|
+
attr_accessor :ReturnCode
|
27
|
+
|
28
|
+
# Status do retorno do antifraude
|
29
|
+
attr_accessor :ReturnStatus
|
30
|
+
|
31
|
+
# Mensagem de retorno do antifraude
|
32
|
+
attr_accessor :ReturnMessage
|
33
|
+
|
34
|
+
# Pontuação do comprador
|
35
|
+
attr_accessor :Score
|
36
|
+
|
37
|
+
# Histórico da análise de antifraude
|
38
|
+
attr_accessor :HistoryCollection
|
39
|
+
|
40
|
+
def initialize
|
41
|
+
@AntiFraudAnalysisStatus = self.AntiFraudAnalysisStatusEnum
|
42
|
+
@HistoryCollection = QuerySaleAntiFraudAnalysisHistoryData.new
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_json
|
46
|
+
hash = {}
|
47
|
+
instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
|
48
|
+
hash
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|