braintree 4.6.0 → 4.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d5f90896056b6236f7150b16b09322c9f32822b23bd4367140418f9506c8767
4
- data.tar.gz: 948821597de9332dccd0ee502f3828b6e6d14253681fe42a8c5950d15fb71882
3
+ metadata.gz: fb259ba1474b20f411b4046f978a7397599c88217b9f1b1a41a969036ca350fa
4
+ data.tar.gz: 4d5dbdf190c5088dca938bf4ecae614db1d1e94f9eb921284523b604686667c9
5
5
  SHA512:
6
- metadata.gz: 3f0d867f7795d6969fe315a78ee163f871d919fc611a9dcba22c259332fd2f1bb47c94676aad8f340ec4cb040ebe2d8f256d50704b9b586b5f4afb6cbf93199c
7
- data.tar.gz: d2db07468b1b333986d61389cb60a16cde90db6168bd445a04a5f04621debdebd0cd334f9623ddc26ee85da546dc4efd1aea3751510d444c72c8e5a4b4771bf5
6
+ metadata.gz: 8b09ef27dc9c38dd0fc3fb03ec487f7d52112629043af3fb4c760274b267767f08e2b1052bbb2d4f67d0ebade4fe7dae0dfde850a3eca1e0114a15219f988204
7
+ data.tar.gz: 6f5223eb5b90f99f9381245a580f766383102146daa4e095cf1e7f413f592ba9fac78f8cdd67b59a149d4c0a0a9c02d80f3a2650fa2187e2eab54443a24bd045
@@ -91,6 +91,7 @@ module Braintree
91
91
  end
92
92
 
93
93
  attr_reader :acquirer_reference_number
94
+ attr_reader :ach_return_code
94
95
  attr_reader :add_ons
95
96
  attr_reader :additional_processor_response # The raw response from the processor.
96
97
  attr_reader :amount
@@ -146,6 +147,7 @@ module Braintree
146
147
  attr_reader :refund_ids
147
148
  attr_reader :refunded_transaction_id
148
149
  attr_reader :refunded_installments
150
+ attr_reader :retried
149
151
  attr_reader :retrieval_reference_number
150
152
  attr_reader :risk_data
151
153
  attr_reader :samsung_pay_card_details
@@ -1,7 +1,7 @@
1
1
  module Braintree
2
2
  module Version
3
3
  Major = 4
4
- Minor = 6
4
+ Minor = 7
5
5
  Tiny = 0
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Tiny}"
@@ -200,7 +200,7 @@ describe Braintree::PaymentMethod do
200
200
  venmo_account.default.should == true
201
201
  venmo_account.token.should == token
202
202
  venmo_account.username.should == "venmojoe"
203
- venmo_account.venmo_user_id.should == "Venmo-Joe-1"
203
+ venmo_account.venmo_user_id.should == "1234567891234567891"
204
204
  venmo_account.image_url.should include(".png")
205
205
  venmo_account.source_description.should == "Venmo Account: venmojoe"
206
206
  venmo_account.customer_id.should == customer.id
@@ -1163,7 +1163,7 @@ describe Braintree::PaymentMethod do
1163
1163
  venmo_account.default.should == true
1164
1164
  venmo_account.image_url.should =~ /venmo/
1165
1165
  venmo_account.username.should == "venmojoe"
1166
- venmo_account.venmo_user_id.should == "Venmo-Joe-1"
1166
+ venmo_account.venmo_user_id.should == "1234567891234567891"
1167
1167
  venmo_account.source_description.should == "Venmo Account: venmojoe"
1168
1168
  venmo_account.customer_id.should == customer.id
1169
1169
  end
@@ -419,6 +419,17 @@ describe Braintree::Transaction, "search" do
419
419
  collection.maximum_size.should == 0
420
420
  end
421
421
 
422
+ it "searches for settlement_confirmed transaction" do
423
+ transaction_id = "settlement_confirmed_txn"
424
+
425
+ collection = Braintree::Transaction.search do |search|
426
+ search.id.is transaction_id
427
+ end
428
+
429
+ collection.maximum_size.should == 1
430
+ collection.first.id.should == transaction_id
431
+ end
432
+
422
433
  it "finds expired authorizations by status" do
423
434
  collection = Braintree::Transaction.search do |search|
424
435
  search.status.in Braintree::Transaction::Status::AuthorizationExpired
@@ -1947,7 +1947,7 @@ describe Braintree::Transaction do
1947
1947
  venmo_account_details.should be_a(Braintree::Transaction::VenmoAccountDetails)
1948
1948
  venmo_account_details.token.should respond_to(:to_str)
1949
1949
  venmo_account_details.username.should == "venmojoe"
1950
- venmo_account_details.venmo_user_id.should == "Venmo-Joe-1"
1950
+ venmo_account_details.venmo_user_id.should == "1234567891234567891"
1951
1951
  venmo_account_details.image_url.should include(".png")
1952
1952
  venmo_account_details.source_description.should == "Venmo Account: venmojoe"
1953
1953
  end
@@ -6941,6 +6941,39 @@ describe Braintree::Transaction do
6941
6941
  end
6942
6942
  end
6943
6943
 
6944
+ describe "retried flag presence in response" do
6945
+ it "creates a retried transaction" do
6946
+ result = Braintree::Transaction.sale(
6947
+ :amount => Braintree::Test::TransactionAmounts::Decline,
6948
+ :payment_method_token => "network_tokenized_credit_card",
6949
+ )
6950
+ transaction = result.transaction
6951
+ transaction.retried.should == true
6952
+ end
6953
+
6954
+ it "creates a non-retried transaction" do
6955
+ result = Braintree::Transaction.sale(
6956
+ :amount => Braintree::Test::TransactionAmounts::Authorize,
6957
+ :payment_method_token => "network_tokenized_credit_card",
6958
+ )
6959
+ transaction = result.transaction
6960
+ transaction.retried.should == nil
6961
+ end
6962
+
6963
+ it "creates a transaction that is ineligible for retries" do
6964
+ result = Braintree::Transaction.sale(
6965
+ :merchant_account_id => SpecHelper::NonDefaultMerchantAccountId,
6966
+ :credit_card => {
6967
+ :number => Braintree::Test::CreditCardNumbers::Visa,
6968
+ :expiration_date => "05/2009"
6969
+ },
6970
+ :amount => Braintree::Test::TransactionAmounts::Authorize,
6971
+ )
6972
+ transaction = result.transaction
6973
+ transaction.retried.should == nil
6974
+ end
6975
+ end
6976
+
6944
6977
  describe "installments" do
6945
6978
  it "creates a transaction with an installment count" do
6946
6979
  result = Braintree::Transaction.create(
@@ -238,6 +238,14 @@ describe Braintree::Transaction do
238
238
  transaction.network_transaction_id.should == "123456789012345"
239
239
  end
240
240
 
241
+ it "accepts ach_return_code" do
242
+ transaction = Braintree::Transaction._new(
243
+ :gateway,
244
+ :ach_return_code => "R01",
245
+ )
246
+ expect(transaction.ach_return_code).to eq("R01")
247
+ end
248
+
241
249
  it "accepts network_response code and network_response_text" do
242
250
  transaction = Braintree::Transaction._new(
243
251
  :gateway,
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: 4.6.0
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braintree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-17 00:00:00.000000000 Z
11
+ date: 2022-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -340,7 +340,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
340
  - !ruby/object:Gem::Version
341
341
  version: '0'
342
342
  requirements: []
343
- rubygems_version: 3.3.7
343
+ rubygems_version: 3.3.10
344
344
  signing_key:
345
345
  specification_version: 4
346
346
  summary: Braintree Ruby Server SDK