braintree 2.98.0 → 2.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/braintree/dispute.rb +7 -1
- data/lib/braintree/version.rb +1 -1
- data/spec/integration/braintree/transaction_spec.rb +7 -24
- data/spec/unit/braintree/dispute_spec.rb +13 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35130c66d5071330674c5341da2e1586416f802a696845c1d81c8076fde0899c
|
4
|
+
data.tar.gz: 7d5f478974b02500f9866f650d6d5f3fdcc700d979aacf64dc7806bf331e6c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a58351bfeed6f12c5988bae9af906a5aa73ff287494e6df8bd01f990140adde54dbe9c1ac9c0afd97a44b4f9dca9d5ffff115be76a7278242d6ff17c3cc397a
|
7
|
+
data.tar.gz: e6b523d6609ed0ae3784b9ddaa43e1fb3e65c5dc05df67e65b752e0b01d104331aedfce100e6244da10099ef1fa80252959d0c3b3473a7488c0fe3ddd8878c3d
|
data/lib/braintree/dispute.rb
CHANGED
@@ -12,11 +12,11 @@ module Braintree
|
|
12
12
|
attr_reader :date_opened
|
13
13
|
attr_reader :date_won
|
14
14
|
attr_reader :evidence
|
15
|
-
attr_reader :forwarded_comments
|
16
15
|
attr_reader :id
|
17
16
|
attr_reader :kind
|
18
17
|
attr_reader :merchant_account_id
|
19
18
|
attr_reader :original_dispute_id
|
19
|
+
attr_reader :processor_comments
|
20
20
|
attr_reader :reason
|
21
21
|
attr_reader :reason_code
|
22
22
|
attr_reader :reason_description
|
@@ -120,5 +120,11 @@ module Braintree
|
|
120
120
|
Braintree::Dispute::HistoryEvent.new(event)
|
121
121
|
end unless status_history.nil?
|
122
122
|
end
|
123
|
+
|
124
|
+
def forwarded_comments
|
125
|
+
# NEXT_MAJOR_VERSION delete this method since it never returned anything anyway.
|
126
|
+
warn "[DEPRECATED] #forwarded_comments is deprecated. Please use #processor_comments"
|
127
|
+
processor_comments
|
128
|
+
end
|
123
129
|
end
|
124
130
|
end
|
data/lib/braintree/version.rb
CHANGED
@@ -4000,7 +4000,7 @@ describe Braintree::Transaction do
|
|
4000
4000
|
result.errors.for(:transaction).for(:external_vault).on(:status)[0].code.should == Braintree::ErrorCodes::Transaction::ExternalVault::StatusIsInvalid
|
4001
4001
|
end
|
4002
4002
|
|
4003
|
-
context "Visa" do
|
4003
|
+
context "Visa/Mastercard/Discover" do
|
4004
4004
|
it "accepts status" do
|
4005
4005
|
result = Braintree::Transaction.create(
|
4006
4006
|
:type => "sale",
|
@@ -4021,7 +4021,7 @@ describe Braintree::Transaction do
|
|
4021
4021
|
result = Braintree::Transaction.create(
|
4022
4022
|
:type => "sale",
|
4023
4023
|
:credit_card => {
|
4024
|
-
:number => Braintree::Test::CreditCardNumbers::
|
4024
|
+
:number => Braintree::Test::CreditCardNumbers::MasterCard,
|
4025
4025
|
:expiration_date => "05/2009"
|
4026
4026
|
},
|
4027
4027
|
:external_vault => {
|
@@ -4038,7 +4038,7 @@ describe Braintree::Transaction do
|
|
4038
4038
|
result = Braintree::Transaction.create(
|
4039
4039
|
:type => "sale",
|
4040
4040
|
:credit_card => {
|
4041
|
-
:number => Braintree::Test::CreditCardNumbers::
|
4041
|
+
:number => Braintree::Test::CreditCardNumbers::Discover,
|
4042
4042
|
:expiration_date => "05/2009"
|
4043
4043
|
},
|
4044
4044
|
:external_vault => {
|
@@ -4050,31 +4050,14 @@ describe Braintree::Transaction do
|
|
4050
4050
|
result.success?.should == false
|
4051
4051
|
result.errors.for(:transaction).for(:external_vault).on(:status)[0].code.should == Braintree::ErrorCodes::Transaction::ExternalVault::StatusWithPreviousNetworkTransactionIdIsInvalid
|
4052
4052
|
end
|
4053
|
-
|
4054
|
-
it "rejects invalid previous_network_transaction_id" do
|
4055
|
-
result = Braintree::Transaction.create(
|
4056
|
-
:type => "sale",
|
4057
|
-
:credit_card => {
|
4058
|
-
:number => Braintree::Test::CreditCardNumbers::Visa,
|
4059
|
-
:expiration_date => "05/2009"
|
4060
|
-
},
|
4061
|
-
:external_vault => {
|
4062
|
-
:status => Braintree::Transaction::ExternalVault::Status::Vaulted,
|
4063
|
-
:previous_network_transaction_id => "not_and_valid_id",
|
4064
|
-
},
|
4065
|
-
:amount => "10.00",
|
4066
|
-
)
|
4067
|
-
result.success?.should == false
|
4068
|
-
result.errors.for(:transaction).for(:external_vault).on(:previous_network_transaction_id)[0].code.should == Braintree::ErrorCodes::Transaction::ExternalVault::PreviousNetworkTransactionIdIsInvalid
|
4069
|
-
end
|
4070
4053
|
end
|
4071
4054
|
|
4072
|
-
context "Non-Visa" do
|
4055
|
+
context "Non-(Visa/Mastercard/Discover) card types" do
|
4073
4056
|
it "accepts status" do
|
4074
4057
|
result = Braintree::Transaction.create(
|
4075
4058
|
:type => "sale",
|
4076
4059
|
:credit_card => {
|
4077
|
-
:number => Braintree::Test::CreditCardNumbers::
|
4060
|
+
:number => Braintree::Test::CreditCardNumbers::AmExes[0],
|
4078
4061
|
:expiration_date => "05/2009"
|
4079
4062
|
},
|
4080
4063
|
:external_vault => {
|
@@ -4090,7 +4073,7 @@ describe Braintree::Transaction do
|
|
4090
4073
|
result = Braintree::Transaction.create(
|
4091
4074
|
:type => "sale",
|
4092
4075
|
:credit_card => {
|
4093
|
-
:number => Braintree::Test::CreditCardNumbers::
|
4076
|
+
:number => Braintree::Test::CreditCardNumbers::AmExes[0],
|
4094
4077
|
:expiration_date => "05/2009"
|
4095
4078
|
},
|
4096
4079
|
:external_vault => {
|
@@ -4107,7 +4090,7 @@ describe Braintree::Transaction do
|
|
4107
4090
|
result = Braintree::Transaction.create(
|
4108
4091
|
:type => "sale",
|
4109
4092
|
:credit_card => {
|
4110
|
-
:number => Braintree::Test::CreditCardNumbers::
|
4093
|
+
:number => Braintree::Test::CreditCardNumbers::AmExes[0],
|
4111
4094
|
:expiration_date => "05/2009"
|
4112
4095
|
},
|
4113
4096
|
:external_vault => {
|
@@ -8,6 +8,7 @@ describe Braintree::Dispute do
|
|
8
8
|
:amount_disputed => "500.00",
|
9
9
|
:amount_won => "0.00",
|
10
10
|
:created_at => Time.utc(2009, 3, 9, 10, 50, 39),
|
11
|
+
:processor_comments => "forwarded comments",
|
11
12
|
:date_opened => "2009-03-09",
|
12
13
|
:date_won => "2009-04-15",
|
13
14
|
:original_dispute_id => "original_dispute_id",
|
@@ -391,6 +392,18 @@ describe Braintree::Dispute do
|
|
391
392
|
end
|
392
393
|
end
|
393
394
|
|
395
|
+
describe "comments" do
|
396
|
+
let(:dispute) { Braintree::Dispute._new(attributes) }
|
397
|
+
|
398
|
+
it "#forwarded_comments returns `processor_comments`" do
|
399
|
+
expect(dispute.forwarded_comments).to eq(dispute.processor_comments)
|
400
|
+
end
|
401
|
+
|
402
|
+
it "#processor_comments" do
|
403
|
+
expect(dispute.processor_comments).to eq(attributes[:processor_comments])
|
404
|
+
end
|
405
|
+
end
|
406
|
+
|
394
407
|
describe "new" do
|
395
408
|
it "is protected" do
|
396
409
|
expect do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braintree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.99.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Braintree
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -320,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
320
|
- !ruby/object:Gem::Version
|
321
321
|
version: '0'
|
322
322
|
requirements: []
|
323
|
-
rubygems_version: 3.0.
|
323
|
+
rubygems_version: 3.0.6
|
324
324
|
signing_key:
|
325
325
|
specification_version: 4
|
326
326
|
summary: Braintree Gateway Ruby Client Library
|