braintree 3.3.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/braintree.gemspec +1 -1
- data/lib/braintree.rb +2 -1
- data/lib/braintree/account_updater_daily_report.rb +1 -1
- data/lib/braintree/address.rb +1 -1
- data/lib/braintree/apple_pay.rb +1 -1
- data/lib/braintree/apple_pay_card.rb +1 -1
- data/lib/braintree/apple_pay_options.rb +1 -1
- data/lib/braintree/authorization_adjustment.rb +1 -1
- data/lib/braintree/client_token.rb +1 -1
- data/lib/braintree/configuration.rb +11 -11
- data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
- data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
- data/lib/braintree/credit_card.rb +2 -2
- data/lib/braintree/credit_card_gateway.rb +3 -3
- data/lib/braintree/credit_card_verification.rb +5 -5
- data/lib/braintree/credit_card_verification_search.rb +1 -1
- data/lib/braintree/customer.rb +2 -2
- data/lib/braintree/customer_search.rb +1 -1
- data/lib/braintree/disbursement.rb +1 -1
- data/lib/braintree/dispute.rb +1 -1
- data/lib/braintree/dispute_gateway.rb +2 -2
- data/lib/braintree/dispute_search.rb +2 -2
- data/lib/braintree/document_upload.rb +1 -1
- data/lib/braintree/error_codes.rb +7 -0
- data/lib/braintree/google_pay_card.rb +1 -1
- data/lib/braintree/granted_payment_instrument_update.rb +1 -1
- data/lib/braintree/graphql_client.rb +7 -7
- data/lib/braintree/http.rb +3 -3
- data/lib/braintree/local_payment_completed.rb +1 -1
- data/lib/braintree/local_payment_reversed.rb +19 -0
- data/lib/braintree/merchant.rb +1 -1
- data/lib/braintree/merchant_account.rb +1 -1
- data/lib/braintree/merchant_account_gateway.rb +1 -1
- data/lib/braintree/merchant_gateway.rb +1 -1
- data/lib/braintree/modification.rb +1 -1
- data/lib/braintree/oauth_credentials.rb +1 -1
- data/lib/braintree/oauth_gateway.rb +5 -5
- data/lib/braintree/payment_instrument_type.rb +10 -10
- data/lib/braintree/payment_method_gateway.rb +3 -3
- data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
- data/lib/braintree/plan.rb +1 -1
- data/lib/braintree/processor_response_types.rb +3 -3
- data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
- data/lib/braintree/samsung_pay_card.rb +1 -1
- data/lib/braintree/settlement_batch_summary.rb +2 -2
- data/lib/braintree/subscription.rb +6 -6
- data/lib/braintree/transaction.rb +32 -24
- data/lib/braintree/transaction_gateway.rb +23 -4
- data/lib/braintree/transaction_line_item.rb +1 -1
- data/lib/braintree/transaction_search.rb +3 -1
- data/lib/braintree/unknown_payment_method.rb +1 -1
- data/lib/braintree/us_bank_account.rb +3 -3
- data/lib/braintree/us_bank_account_verification.rb +1 -1
- data/lib/braintree/us_bank_account_verification_gateway.rb +1 -1
- data/lib/braintree/util.rb +4 -4
- data/lib/braintree/venmo_account.rb +1 -1
- data/lib/braintree/version.rb +1 -1
- data/lib/braintree/visa_checkout_card.rb +2 -2
- data/lib/braintree/webhook_notification.rb +28 -19
- data/lib/braintree/webhook_notification_gateway.rb +5 -5
- data/lib/braintree/webhook_testing_gateway.rb +10 -0
- data/lib/braintree/xml/generator.rb +5 -4
- data/lib/braintree/xml/libxml.rb +1 -1
- data/lib/braintree/xml/parser.rb +10 -10
- data/spec/integration/braintree/add_on_spec.rb +1 -1
- data/spec/integration/braintree/address_spec.rb +24 -24
- data/spec/integration/braintree/advanced_search_spec.rb +45 -45
- data/spec/integration/braintree/apple_pay_spec.rb +3 -3
- data/spec/integration/braintree/braintree_gateway_spec.rb +2 -1
- data/spec/integration/braintree/client_api/client_token_spec.rb +14 -14
- data/spec/integration/braintree/client_api/spec_helper.rb +5 -5
- data/spec/integration/braintree/credit_card_spec.rb +119 -119
- data/spec/integration/braintree/credit_card_verification_search_spec.rb +2 -2
- data/spec/integration/braintree/credit_card_verification_spec.rb +1 -1
- data/spec/integration/braintree/customer_search_spec.rb +8 -8
- data/spec/integration/braintree/customer_spec.rb +165 -165
- data/spec/integration/braintree/dispute_search_spec.rb +3 -3
- data/spec/integration/braintree/dispute_spec.rb +6 -6
- data/spec/integration/braintree/error_codes_spec.rb +1 -1
- data/spec/integration/braintree/http_spec.rb +2 -2
- data/spec/integration/braintree/merchant_account_spec.rb +25 -26
- data/spec/integration/braintree/merchant_spec.rb +12 -12
- data/spec/integration/braintree/oauth_spec.rb +11 -11
- data/spec/integration/braintree/payment_method_nonce_spec.rb +12 -12
- data/spec/integration/braintree/payment_method_spec.rb +165 -165
- data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +9 -9
- data/spec/integration/braintree/paypal_account_spec.rb +28 -28
- data/spec/integration/braintree/samsung_pay_card_spec.rb +9 -9
- data/spec/integration/braintree/settlement_batch_summary_spec.rb +8 -8
- data/spec/integration/braintree/subscription_spec.rb +133 -133
- data/spec/integration/braintree/test/transaction_amounts_spec.rb +2 -2
- data/spec/integration/braintree/test_transaction_spec.rb +10 -10
- data/spec/integration/braintree/transaction_search_spec.rb +93 -67
- data/spec/integration/braintree/transaction_spec.rb +498 -344
- data/spec/integration/braintree/transaction_us_bank_account_spec.rb +20 -20
- data/spec/integration/braintree/us_bank_account_spec.rb +6 -6
- data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +7 -7
- data/spec/integration/braintree/us_bank_account_verification_spec.rb +8 -8
- data/spec/integration/braintree/visa_checkout_card_spec.rb +5 -5
- data/spec/integration/spec_helper.rb +2 -2
- data/spec/oauth_test_helper.rb +1 -1
- data/spec/script/httpsd.rb +6 -6
- data/spec/spec_helper.rb +4 -3
- data/spec/unit/braintree/address_spec.rb +1 -1
- data/spec/unit/braintree/apple_pay_card_spec.rb +1 -1
- data/spec/unit/braintree/client_token_spec.rb +2 -2
- data/spec/unit/braintree/configuration_spec.rb +42 -42
- data/spec/unit/braintree/credit_card_spec.rb +7 -7
- data/spec/unit/braintree/credit_card_verification_search_spec.rb +1 -1
- data/spec/unit/braintree/credit_card_verification_spec.rb +2 -2
- data/spec/unit/braintree/customer_spec.rb +3 -3
- data/spec/unit/braintree/disbursement_spec.rb +7 -7
- data/spec/unit/braintree/dispute_spec.rb +8 -8
- data/spec/unit/braintree/error_result_spec.rb +5 -5
- data/spec/unit/braintree/errors_spec.rb +8 -8
- data/spec/unit/braintree/http_spec.rb +5 -5
- data/spec/unit/braintree/merchant_account_spec.rb +1 -1
- data/spec/unit/braintree/payment_method_spec.rb +1 -1
- data/spec/unit/braintree/paypal_account_spec.rb +2 -2
- data/spec/unit/braintree/resource_collection_spec.rb +9 -9
- data/spec/unit/braintree/subscription_search_spec.rb +1 -1
- data/spec/unit/braintree/successful_result_spec.rb +1 -1
- data/spec/unit/braintree/three_d_secure_info_spec.rb +1 -1
- data/spec/unit/braintree/transaction/credit_card_details_spec.rb +3 -3
- data/spec/unit/braintree/transaction/customer_details_spec.rb +1 -1
- data/spec/unit/braintree/transaction/deposit_details_spec.rb +2 -2
- data/spec/unit/braintree/transaction/paypal_details_spec.rb +1 -1
- data/spec/unit/braintree/transaction_search_spec.rb +12 -12
- data/spec/unit/braintree/transaction_spec.rb +25 -17
- data/spec/unit/braintree/util_spec.rb +18 -18
- data/spec/unit/braintree/validation_error_collection_spec.rb +36 -36
- data/spec/unit/braintree/webhook_notification_spec.rb +72 -56
- data/spec/unit/braintree/xml_spec.rb +31 -31
- metadata +3 -3
- data/lib/braintree/settlement_batch.rb +0 -0
@@ -99,34 +99,34 @@ describe Braintree::Xml do
|
|
99
99
|
verify_to_xml_and_back hash
|
100
100
|
end
|
101
101
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
102
|
+
context "Integer" do
|
103
|
+
it "works for integers" do
|
104
|
+
hash = {:root => {:foo => 1}}
|
105
|
+
Braintree::Xml.hash_to_xml(hash).should include("<foo type=\"integer\">1</foo>")
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
context "BigDecimal" do
|
110
|
+
it "works for BigDecimals" do
|
111
|
+
hash = {:root => {:foo => BigDecimal("123.45")}}
|
112
|
+
Braintree::Xml.hash_to_xml(hash).should include("<foo>123.45</foo>")
|
113
|
+
end
|
114
|
+
|
115
|
+
it "works for BigDecimals with fewer than 2 digits" do
|
116
|
+
hash = {:root => {:foo => BigDecimal("1000.0")}}
|
117
|
+
Braintree::Xml.hash_to_xml(hash).should include("<foo>1000.00</foo>")
|
118
|
+
end
|
119
|
+
|
120
|
+
it "works for BigDecimals with more than 2 digits" do
|
121
|
+
hash = {:root => {:foo => BigDecimal("12.345")}}
|
122
|
+
Braintree::Xml.hash_to_xml(hash).should include("<foo>12.345</foo>")
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
it "works for symbols" do
|
127
|
+
hash = {:root => {:foo => :bar}}
|
128
|
+
Braintree::Xml.hash_to_xml(hash).should include("<foo>bar</foo>")
|
129
|
+
end
|
130
130
|
|
131
131
|
it "type casts booleans" do
|
132
132
|
hash = {:root => {:string_true => "true", :bool_true => true, :bool_false => false, :string_false => "false"}}
|
@@ -154,13 +154,13 @@ describe Braintree::Xml do
|
|
154
154
|
end
|
155
155
|
|
156
156
|
it "escapes keys and values" do
|
157
|
-
hash = {
|
157
|
+
hash = {"ke<y" => "val>ue"}
|
158
158
|
Braintree::Xml.hash_to_xml(hash).should include("<ke<y>val>ue</ke<y>")
|
159
159
|
end
|
160
160
|
|
161
161
|
it "escapes nested keys and values" do
|
162
|
-
hash = {
|
163
|
-
Braintree::Xml.hash_to_xml(hash).gsub(/\s/,
|
162
|
+
hash = {"top<" => {"ke<y" => "val>ue"}}
|
163
|
+
Braintree::Xml.hash_to_xml(hash).gsub(/\s/, "").should include("<top<><ke<y>val>ue</ke<y></top<>")
|
164
164
|
end
|
165
165
|
end
|
166
166
|
end
|
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: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Braintree
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/braintree/graphql_client.rb
|
104
104
|
- lib/braintree/http.rb
|
105
105
|
- lib/braintree/local_payment_completed.rb
|
106
|
+
- lib/braintree/local_payment_reversed.rb
|
106
107
|
- lib/braintree/merchant.rb
|
107
108
|
- lib/braintree/merchant_account.rb
|
108
109
|
- lib/braintree/merchant_account/address_details.rb
|
@@ -131,7 +132,6 @@ files:
|
|
131
132
|
- lib/braintree/revoked_payment_method_metadata.rb
|
132
133
|
- lib/braintree/risk_data.rb
|
133
134
|
- lib/braintree/samsung_pay_card.rb
|
134
|
-
- lib/braintree/settlement_batch.rb
|
135
135
|
- lib/braintree/settlement_batch_summary.rb
|
136
136
|
- lib/braintree/settlement_batch_summary_gateway.rb
|
137
137
|
- lib/braintree/sha256_digest.rb
|
File without changes
|