braintree 2.68.2 → 2.69.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f959a5b8e2eb6fd12c14023b7f3c6226e95052b
4
- data.tar.gz: a172c5411435ab1f6c91784e3175ce2c52752db0
3
+ metadata.gz: 34d2cb3afbf9042bb515975c43696987335b8691
4
+ data.tar.gz: 02d627a19b5a6020b3e0f6d59131094cc7bdaa96
5
5
  SHA512:
6
- metadata.gz: d4555e21b4728f89d06ecbfe39b498b5990f6394c774e0f8c198e3cb0a182abc60dc9933abd80e027b9d0ce80563f20a7e77a297c9e90f1dd352e98ea83012a6
7
- data.tar.gz: e7254d320ff795574e979784b44e3ab05186155a44df406e231562b2b8edd42b4790f11fe4f9f2c1ac0f173bde22d05d9e798edcd7cd55531d98804d37b0ddfb
6
+ metadata.gz: 4c14748930d920ffb8563ba7a93396fbcf554f769c60db0e5a077d7a648f8f5f1e672828c7a5b57f211f4526e4d5d7571bb6ea2b331082845dd1c5db23a69169
7
+ data.tar.gz: 9dc3a49b9a3075c8c58eedef3c9231452b4349d7f3b69ebd6b81b744062641096f7d74998d418386a277754169574c270b580abb1c750af91bd04684eedfd5d4
data/lib/braintree.rb CHANGED
@@ -21,6 +21,7 @@ require "braintree/base_module"
21
21
  require "braintree/modification"
22
22
 
23
23
  require "braintree/account_updater_daily_report"
24
+ require "braintree/ach_mandate"
24
25
  require "braintree/add_on"
25
26
  require "braintree/add_on_gateway"
26
27
  require "braintree/address"
@@ -0,0 +1,13 @@
1
+ module Braintree
2
+ class AchMandate
3
+ include BaseModule # :nodoc:
4
+
5
+ attr_reader :text, :accepted_at
6
+
7
+ def initialize(attributes)
8
+ set_instance_variables_from_hash(attributes)
9
+ @accepted_at = Time.parse(attributes[:accepted_at]) unless @accepted_at.class == Time
10
+ end
11
+
12
+ end
13
+ end
@@ -10,12 +10,13 @@ module Braintree
10
10
  Configuration.gateway.payment_method_nonce.find(payment_method_nonce)
11
11
  end
12
12
 
13
- attr_reader :nonce, :three_d_secure_info, :type
13
+ attr_reader :nonce, :three_d_secure_info, :type, :details
14
14
 
15
15
  def initialize(gateway, attributes) # :nodoc:
16
16
  @gateway = gateway
17
17
  @nonce = attributes.fetch(:nonce)
18
18
  @type = attributes.fetch(:type)
19
+ @details = attributes.fetch(:details)
19
20
  @three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info]
20
21
  end
21
22
 
@@ -3,10 +3,11 @@ module Braintree
3
3
  class UsBankAccountDetails # :nodoc:
4
4
  include BaseModule
5
5
 
6
- attr_reader :routing_number, :last_4, :account_type, :account_description, :account_holder_name, :token, :image_url, :bank_name
6
+ attr_reader :routing_number, :last_4, :account_type, :account_description, :account_holder_name, :token, :image_url, :bank_name, :ach_mandate
7
7
 
8
8
  def initialize(attributes)
9
9
  set_instance_variables_from_hash attributes unless attributes.nil?
10
+ @ach_mandate = attributes[:ach_mandate] ? AchMandate.new(attributes[:ach_mandate]) : nil
10
11
  end
11
12
  end
12
13
  end
@@ -2,11 +2,16 @@ module Braintree
2
2
  class UsBankAccount
3
3
  include BaseModule
4
4
 
5
- attr_reader :routing_number, :last_4, :account_type, :account_description, :account_holder_name, :token, :image_url, :bank_name
5
+ attr_reader :routing_number, :last_4, :account_type, :account_description, :account_holder_name, :token, :image_url, :bank_name, :ach_mandate, :default
6
6
 
7
7
  def initialize(gateway, attributes) # :nodoc:
8
8
  @gateway = gateway
9
9
  set_instance_variables_from_hash(attributes)
10
+ @ach_mandate = AchMandate.new(attributes[:ach_mandate]) if attributes[:ach_mandate]
11
+ end
12
+
13
+ def default?
14
+ @default
10
15
  end
11
16
 
12
17
  class << self
@@ -1,8 +1,8 @@
1
1
  module Braintree
2
2
  module Version
3
3
  Major = 2
4
- Minor = 68
5
- Tiny = 2
4
+ Minor = 69
5
+ Tiny = 0
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Tiny}"
8
8
  end
data/spec/httpsd.pid CHANGED
@@ -1 +1 @@
1
- 24610
1
+ 20306
@@ -59,9 +59,41 @@ end
59
59
  def generate_valid_us_bank_account_nonce()
60
60
  raw_client_token = Braintree::ClientToken.generate
61
61
  client_token = decode_client_token(raw_client_token)
62
- url = client_token["braintree_api"]["url"]
63
- out = `./spec/client.sh #{url}/tokens`
64
- out.strip
62
+ url = client_token["braintree_api"]["url"] + "/tokens"
63
+ token = client_token["braintree_api"]["access_token"]
64
+ payload = {
65
+ :type => "us_bank_account",
66
+ :billing_address => {
67
+ :street_address => "123 Ave",
68
+ :region => "CA",
69
+ :locality => "San Francisco",
70
+ :postal_code => "94112"
71
+ },
72
+ :account_type => "checking",
73
+ :routing_number => "123456789",
74
+ :account_number => "567891234",
75
+ :account_holder_name => "Dan Schulman",
76
+ :account_description => "PayPal Checking - 1234",
77
+ :ach_mandate => {
78
+ :text => "cl mandate text"
79
+ }
80
+ }
81
+
82
+ uri = URI::parse(url)
83
+ connection = Net::HTTP.new(uri.host, uri.port)
84
+ connection.use_ssl = true
85
+ connection.verify_mode = OpenSSL::SSL::VERIFY_PEER
86
+ resp = connection.start do |http|
87
+ request = Net::HTTP::Post.new(uri.path)
88
+ request["Content-Type"] = "application/json"
89
+ request["Braintree-Version"] = "2015-11-01"
90
+ request["Authorization"] = "Bearer #{token}"
91
+ request.body = payload.to_json
92
+ http.request(request)
93
+ end
94
+
95
+ json = JSON.parse(resp.body)
96
+ json["data"]["id"]
65
97
  end
66
98
 
67
99
  def sample(arr)
@@ -31,6 +31,7 @@ describe Braintree::PaymentMethodNonce do
31
31
  result.should be_success
32
32
  result.payment_method_nonce.should_not be_nil
33
33
  result.payment_method_nonce.nonce.should_not be_nil
34
+ result.payment_method_nonce.details.should_not be_nil
34
35
  end
35
36
 
36
37
  it "correctly raises and exception for a non existent token" do
@@ -49,6 +50,8 @@ describe Braintree::PaymentMethodNonce do
49
50
  result.should be_success
50
51
  nonce.nonce.should == "fake-valid-nonce"
51
52
  nonce.type.should == "CreditCard"
53
+ nonce.details.fetch(:last_two).should == "81"
54
+ nonce.details.fetch(:card_type).should == "Visa"
52
55
  end
53
56
 
54
57
  it "returns null 3ds_info if there isn't any" do
@@ -498,6 +498,9 @@ describe Braintree::PaymentMethod do
498
498
  us_bank_account.account_description.should == "PayPal Checking - 1234"
499
499
  us_bank_account.account_holder_name.should == "Dan Schulman"
500
500
  us_bank_account.bank_name.should == "UNKNOWN"
501
+ us_bank_account.default.should == true
502
+ us_bank_account.ach_mandate.text.should == "cl mandate text"
503
+ us_bank_account.ach_mandate.accepted_at.should be_a Time
501
504
  end
502
505
 
503
506
  it "does not creates a payment method from an invalid us bank account nonce" do
@@ -2129,6 +2129,8 @@ describe Braintree::Transaction do
2129
2129
  result.transaction.us_bank_account_details.account_description.should == "PayPal Checking - 1234"
2130
2130
  result.transaction.us_bank_account_details.account_holder_name.should == "Dan Schulman"
2131
2131
  result.transaction.us_bank_account_details.bank_name.should == "UNKNOWN"
2132
+ result.transaction.us_bank_account_details.ach_mandate.text.should == "cl mandate text"
2133
+ result.transaction.us_bank_account_details.ach_mandate.accepted_at.should be_a Time
2132
2134
  end
2133
2135
 
2134
2136
  it "return successful result for vaulting and transacting on vaulted token" do
@@ -2152,6 +2154,9 @@ describe Braintree::Transaction do
2152
2154
  result.transaction.us_bank_account_details.account_type.should == "checking"
2153
2155
  result.transaction.us_bank_account_details.account_description.should == "PayPal Checking - 1234"
2154
2156
  result.transaction.us_bank_account_details.account_holder_name.should == "Dan Schulman"
2157
+ result.transaction.us_bank_account_details.bank_name.should == "UNKNOWN"
2158
+ result.transaction.us_bank_account_details.ach_mandate.text.should == "cl mandate text"
2159
+ result.transaction.us_bank_account_details.ach_mandate.accepted_at.should be_a Time
2155
2160
 
2156
2161
  result = Braintree::Transaction.create(
2157
2162
  :type => "sale",
@@ -2172,6 +2177,9 @@ describe Braintree::Transaction do
2172
2177
  result.transaction.us_bank_account_details.account_type.should == "checking"
2173
2178
  result.transaction.us_bank_account_details.account_description.should == "PayPal Checking - 1234"
2174
2179
  result.transaction.us_bank_account_details.account_holder_name.should == "Dan Schulman"
2180
+ result.transaction.us_bank_account_details.bank_name.should == "UNKNOWN"
2181
+ result.transaction.us_bank_account_details.ach_mandate.text.should == "cl mandate text"
2182
+ result.transaction.us_bank_account_details.ach_mandate.accepted_at.should be_a Time
2175
2183
  end
2176
2184
 
2177
2185
  it "returns failure for token that doesn't exist" do
@@ -21,6 +21,8 @@ describe Braintree::UsBankAccount do
21
21
  us_bank_account.account_description.should == "PayPal Checking - 1234"
22
22
  us_bank_account.account_holder_name.should == "Dan Schulman"
23
23
  us_bank_account.bank_name.should == "UNKNOWN"
24
+ us_bank_account.ach_mandate.text.should == "cl mandate text"
25
+ us_bank_account.ach_mandate.accepted_at.should be_a Time
24
26
  end
25
27
 
26
28
  it "raises if the payment method token is not found" do
@@ -53,6 +55,8 @@ describe Braintree::UsBankAccount do
53
55
  us_bank_account.account_description.should == "PayPal Checking - 1234"
54
56
  us_bank_account.account_holder_name.should == "Dan Schulman"
55
57
  us_bank_account.bank_name.should == "UNKNOWN"
58
+ us_bank_account.ach_mandate.text.should == "cl mandate text"
59
+ us_bank_account.ach_mandate.accepted_at.should be_a Time
56
60
  end
57
61
  end
58
62
 
@@ -78,6 +82,8 @@ describe Braintree::UsBankAccount do
78
82
  us_bank_account.account_description.should == "PayPal Checking - 1234"
79
83
  us_bank_account.account_holder_name.should == "Dan Schulman"
80
84
  us_bank_account.bank_name.should == "UNKNOWN"
85
+ us_bank_account.ach_mandate.text.should == "cl mandate text"
86
+ us_bank_account.ach_mandate.accepted_at.should be_a Time
81
87
  end
82
88
 
83
89
  it "does not creates a transaction using a us bank account and returns raises an exception" do
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
+
3
+ describe Braintree::UsBankAccount do
4
+ describe "default?" do
5
+ it "is true if the us bank account is the default us bank account for the customer" do
6
+ Braintree::UsBankAccount._new(:gateway, :default => true).default?.should == true
7
+ end
8
+
9
+ it "is false if the us bank account is not the default us bank account for the customer" do
10
+ Braintree::UsBankAccount._new(:gateway, :default => false).default?.should == false
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.68.2
4
+ version: 2.69.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braintree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2016-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.0.0
27
27
  description: Ruby library for integrating with the Braintree Gateway
@@ -30,213 +30,214 @@ executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
- - README.rdoc
34
33
  - LICENSE
35
- - lib/braintree/paypal_account_gateway.rb
36
- - lib/braintree/payment_method.rb
37
- - lib/braintree/risk_data.rb
38
- - lib/braintree/credentials_parser.rb
39
- - lib/braintree/credit_card_verification_gateway.rb
40
- - lib/braintree/credit_card_gateway.rb
41
- - lib/braintree/transaction_search.rb
42
- - lib/braintree/dispute.rb
43
- - lib/braintree/settlement_batch_summary_gateway.rb
44
- - lib/braintree/merchant_gateway.rb
45
- - lib/braintree/webhook_notification.rb
46
- - lib/braintree/us_bank_account.rb
34
+ - README.rdoc
35
+ - braintree.gemspec
36
+ - lib/braintree.rb
37
+ - lib/braintree/account_updater_daily_report.rb
38
+ - lib/braintree/ach_mandate.rb
39
+ - lib/braintree/add_on.rb
40
+ - lib/braintree/add_on_gateway.rb
41
+ - lib/braintree/address.rb
47
42
  - lib/braintree/address/country_names.rb
48
- - lib/braintree/coinbase_account.rb
49
- - lib/braintree/webhook_notification_gateway.rb
43
+ - lib/braintree/address_gateway.rb
44
+ - lib/braintree/advanced_search.rb
45
+ - lib/braintree/amex_express_checkout_card.rb
46
+ - lib/braintree/android_pay_card.rb
47
+ - lib/braintree/apple_pay_card.rb
48
+ - lib/braintree/base_module.rb
49
+ - lib/braintree/client_token.rb
50
50
  - lib/braintree/client_token_gateway.rb
51
- - lib/braintree/payment_method_nonce_gateway.rb
52
- - lib/braintree/merchant_account.rb
53
- - lib/braintree/venmo_account.rb
54
- - lib/braintree/subscription.rb
55
- - lib/braintree/merchant.rb
56
- - lib/braintree/payment_method_gateway.rb
51
+ - lib/braintree/coinbase_account.rb
52
+ - lib/braintree/configuration.rb
53
+ - lib/braintree/credentials_parser.rb
57
54
  - lib/braintree/credit_card.rb
58
- - lib/braintree/plan.rb
59
- - lib/braintree/error_result.rb
60
- - lib/braintree/sha256_digest.rb
61
- - lib/braintree/payment_instrument_type.rb
62
- - lib/braintree/settlement_batch_summary.rb
63
- - lib/braintree/europe_bank_account.rb
64
- - lib/braintree/base_module.rb
65
- - lib/braintree/errors.rb
66
- - lib/braintree/transparent_redirect.rb
67
- - lib/braintree/gateway.rb
68
- - lib/braintree/customer_gateway.rb
69
- - lib/braintree/webhook_testing_gateway.rb
70
- - lib/braintree/validation_error_collection.rb
71
- - lib/braintree/successful_result.rb
72
- - lib/braintree/transparent_redirect_gateway.rb
55
+ - lib/braintree/credit_card_gateway.rb
56
+ - lib/braintree/credit_card_verification.rb
57
+ - lib/braintree/credit_card_verification_gateway.rb
73
58
  - lib/braintree/credit_card_verification_search.rb
74
- - lib/braintree/three_d_secure_info.rb
75
- - lib/braintree/amex_express_checkout_card.rb
76
- - lib/braintree/xml/generator.rb
77
- - lib/braintree/xml/rexml.rb
78
- - lib/braintree/xml/parser.rb
79
- - lib/braintree/xml/libxml.rb
80
- - lib/braintree/resource_collection.rb
81
- - lib/braintree/client_token.rb
82
- - lib/braintree/subscription_gateway.rb
83
59
  - lib/braintree/customer.rb
84
- - lib/braintree/facilitator_details.rb
85
- - lib/braintree/europe_bank_account_gateway.rb
60
+ - lib/braintree/customer_gateway.rb
61
+ - lib/braintree/customer_search.rb
86
62
  - lib/braintree/descriptor.rb
87
- - lib/braintree/apple_pay_card.rb
88
- - lib/braintree/advanced_search.rb
89
- - lib/braintree/testing_gateway.rb
90
- - lib/braintree/http.rb
91
- - lib/braintree/oauth_credentials.rb
92
- - lib/braintree/validation_error.rb
93
- - lib/braintree/credit_card_verification.rb
94
- - lib/braintree/dispute/transaction_details.rb
95
- - lib/braintree/plan_gateway.rb
96
- - lib/braintree/configuration.rb
97
- - lib/braintree/modification.rb
98
- - lib/braintree/add_on_gateway.rb
99
- - lib/braintree/subscription/status_details.rb
63
+ - lib/braintree/digest.rb
100
64
  - lib/braintree/disbursement.rb
101
- - lib/braintree/address_gateway.rb
102
- - lib/braintree/customer_search.rb
103
- - lib/braintree/subscription_search.rb
104
- - lib/braintree/transaction.rb
105
- - lib/braintree/account_updater_daily_report.rb
65
+ - lib/braintree/discount.rb
66
+ - lib/braintree/discount_gateway.rb
67
+ - lib/braintree/dispute.rb
68
+ - lib/braintree/dispute/transaction_details.rb
69
+ - lib/braintree/error_codes.rb
70
+ - lib/braintree/error_result.rb
71
+ - lib/braintree/errors.rb
72
+ - lib/braintree/europe_bank_account.rb
73
+ - lib/braintree/europe_bank_account_gateway.rb
74
+ - lib/braintree/exceptions.rb
75
+ - lib/braintree/facilitator_details.rb
76
+ - lib/braintree/gateway.rb
77
+ - lib/braintree/http.rb
78
+ - lib/braintree/merchant.rb
79
+ - lib/braintree/merchant_account.rb
106
80
  - lib/braintree/merchant_account/address_details.rb
107
- - lib/braintree/merchant_account/funding_details.rb
108
81
  - lib/braintree/merchant_account/business_details.rb
82
+ - lib/braintree/merchant_account/funding_details.rb
109
83
  - lib/braintree/merchant_account/individual_details.rb
84
+ - lib/braintree/merchant_account_gateway.rb
85
+ - lib/braintree/merchant_gateway.rb
86
+ - lib/braintree/modification.rb
87
+ - lib/braintree/oauth_credentials.rb
88
+ - lib/braintree/oauth_gateway.rb
89
+ - lib/braintree/payment_instrument_type.rb
90
+ - lib/braintree/payment_method.rb
91
+ - lib/braintree/payment_method_gateway.rb
92
+ - lib/braintree/payment_method_nonce.rb
93
+ - lib/braintree/payment_method_nonce_gateway.rb
94
+ - lib/braintree/paypal_account.rb
95
+ - lib/braintree/paypal_account_gateway.rb
96
+ - lib/braintree/plan.rb
97
+ - lib/braintree/plan_gateway.rb
98
+ - lib/braintree/resource_collection.rb
99
+ - lib/braintree/risk_data.rb
110
100
  - lib/braintree/settlement_batch.rb
111
- - lib/braintree/transaction_gateway.rb
112
- - lib/braintree/test/nonce.rb
113
- - lib/braintree/test/merchant_account.rb
101
+ - lib/braintree/settlement_batch_summary.rb
102
+ - lib/braintree/settlement_batch_summary_gateway.rb
103
+ - lib/braintree/sha256_digest.rb
104
+ - lib/braintree/signature_service.rb
105
+ - lib/braintree/subscription.rb
106
+ - lib/braintree/subscription/status_details.rb
107
+ - lib/braintree/subscription_gateway.rb
108
+ - lib/braintree/subscription_search.rb
109
+ - lib/braintree/successful_result.rb
114
110
  - lib/braintree/test/credit_card.rb
115
- - lib/braintree/test/venmo_sdk.rb
111
+ - lib/braintree/test/merchant_account.rb
112
+ - lib/braintree/test/nonce.rb
116
113
  - lib/braintree/test/transaction_amounts.rb
117
- - lib/braintree/util.rb
118
- - lib/braintree/address.rb
119
- - lib/braintree/digest.rb
120
- - lib/braintree/transaction/disbursement_details.rb
114
+ - lib/braintree/test/venmo_sdk.rb
115
+ - lib/braintree/test_transaction.rb
116
+ - lib/braintree/testing_gateway.rb
117
+ - lib/braintree/three_d_secure_info.rb
118
+ - lib/braintree/transaction.rb
121
119
  - lib/braintree/transaction/address_details.rb
122
- - lib/braintree/transaction/subscription_details.rb
123
- - lib/braintree/transaction/us_bank_account_details.rb
124
120
  - lib/braintree/transaction/amex_express_checkout_details.rb
125
- - lib/braintree/transaction/customer_details.rb
126
- - lib/braintree/transaction/credit_card_details.rb
127
121
  - lib/braintree/transaction/android_pay_details.rb
128
- - lib/braintree/transaction/status_details.rb
129
- - lib/braintree/transaction/coinbase_details.rb
130
122
  - lib/braintree/transaction/apple_pay_details.rb
131
- - lib/braintree/transaction/venmo_account_details.rb
123
+ - lib/braintree/transaction/coinbase_details.rb
124
+ - lib/braintree/transaction/credit_card_details.rb
125
+ - lib/braintree/transaction/customer_details.rb
126
+ - lib/braintree/transaction/disbursement_details.rb
132
127
  - lib/braintree/transaction/paypal_details.rb
133
- - lib/braintree/add_on.rb
134
- - lib/braintree/discount.rb
135
- - lib/braintree/discount_gateway.rb
136
- - lib/braintree/signature_service.rb
137
- - lib/braintree/merchant_account_gateway.rb
138
- - lib/braintree/webhook_testing.rb
139
- - lib/braintree/paypal_account.rb
140
- - lib/braintree/payment_method_nonce.rb
141
- - lib/braintree/android_pay_card.rb
128
+ - lib/braintree/transaction/status_details.rb
129
+ - lib/braintree/transaction/subscription_details.rb
130
+ - lib/braintree/transaction/us_bank_account_details.rb
131
+ - lib/braintree/transaction/venmo_account_details.rb
132
+ - lib/braintree/transaction_gateway.rb
133
+ - lib/braintree/transaction_search.rb
134
+ - lib/braintree/transparent_redirect.rb
135
+ - lib/braintree/transparent_redirect_gateway.rb
142
136
  - lib/braintree/unknown_payment_method.rb
143
- - lib/braintree/test_transaction.rb
144
- - lib/braintree/error_codes.rb
145
- - lib/braintree/version.rb
146
- - lib/braintree/oauth_gateway.rb
137
+ - lib/braintree/us_bank_account.rb
147
138
  - lib/braintree/us_bank_account_gateway.rb
139
+ - lib/braintree/util.rb
140
+ - lib/braintree/validation_error.rb
141
+ - lib/braintree/validation_error_collection.rb
142
+ - lib/braintree/venmo_account.rb
143
+ - lib/braintree/version.rb
144
+ - lib/braintree/webhook_notification.rb
145
+ - lib/braintree/webhook_notification_gateway.rb
146
+ - lib/braintree/webhook_testing.rb
147
+ - lib/braintree/webhook_testing_gateway.rb
148
148
  - lib/braintree/xml.rb
149
- - lib/braintree/exceptions.rb
150
- - lib/braintree.rb
151
- - lib/ssl/securetrust_ca.crt
149
+ - lib/braintree/xml/generator.rb
150
+ - lib/braintree/xml/libxml.rb
151
+ - lib/braintree/xml/parser.rb
152
+ - lib/braintree/xml/rexml.rb
152
153
  - lib/ssl/api_braintreegateway_com.ca.crt
153
- - spec/unit/braintree_spec.rb
154
- - spec/unit/spec_helper.rb
155
- - spec/unit/braintree/dispute_spec.rb
156
- - spec/unit/braintree/credentials_parser_spec.rb
157
- - spec/unit/braintree/webhook_notification_spec.rb
158
- - spec/unit/braintree/credit_card_spec.rb
159
- - spec/unit/braintree/subscription_search_spec.rb
160
- - spec/unit/braintree/credit_card_verification_search_spec.rb
161
- - spec/unit/braintree/three_d_secure_info_spec.rb
162
- - spec/unit/braintree/http_spec.rb
163
- - spec/unit/braintree/successful_result_spec.rb
164
- - spec/unit/braintree/customer_spec.rb
165
- - spec/unit/braintree/error_result_spec.rb
166
- - spec/unit/braintree/transparent_redirect_spec.rb
167
- - spec/unit/braintree/disbursement_spec.rb
168
- - spec/unit/braintree/sha256_digest_spec.rb
169
- - spec/unit/braintree/subscription_spec.rb
170
- - spec/unit/braintree/validation_error_collection_spec.rb
171
- - spec/unit/braintree/xml/parser_spec.rb
172
- - spec/unit/braintree/xml/libxml_spec.rb
173
- - spec/unit/braintree/xml/rexml_spec.rb
174
- - spec/unit/braintree/transaction_spec.rb
175
- - spec/unit/braintree/signature_service_spec.rb
176
- - spec/unit/braintree/transaction_search_spec.rb
177
- - spec/unit/braintree/validation_error_spec.rb
178
- - spec/unit/braintree/address_spec.rb
179
- - spec/unit/braintree/configuration_spec.rb
180
- - spec/unit/braintree/resource_collection_spec.rb
181
- - spec/unit/braintree/merchant_account_spec.rb
182
- - spec/unit/braintree/apple_pay_card_spec.rb
183
- - spec/unit/braintree/base_module_spec.rb
184
- - spec/unit/braintree/risk_data_spec.rb
185
- - spec/unit/braintree/digest_spec.rb
186
- - spec/unit/braintree/unknown_payment_method_spec.rb
187
- - spec/unit/braintree/transaction/deposit_details_spec.rb
188
- - spec/unit/braintree/transaction/customer_details_spec.rb
189
- - spec/unit/braintree/transaction/credit_card_details_spec.rb
190
- - spec/unit/braintree/errors_spec.rb
191
- - spec/unit/braintree/paypal_account_spec.rb
192
- - spec/unit/braintree/client_token_spec.rb
193
- - spec/unit/braintree/modification_spec.rb
194
- - spec/unit/braintree/payment_method_spec.rb
195
- - spec/unit/braintree/xml_spec.rb
196
- - spec/unit/braintree/credit_card_verification_spec.rb
197
- - spec/unit/braintree/util_spec.rb
198
- - spec/oauth_test_helper.rb
154
+ - lib/ssl/securetrust_ca.crt
155
+ - spec/hacks/tcp_socket.rb
199
156
  - spec/httpsd.pid
200
- - spec/integration/spec_helper.rb
201
- - spec/integration/braintree/payment_method_nonce_spec.rb
202
- - spec/integration/braintree/oauth_spec.rb
157
+ - spec/integration/braintree/add_on_spec.rb
158
+ - spec/integration/braintree/address_spec.rb
203
159
  - spec/integration/braintree/advanced_search_spec.rb
160
+ - spec/integration/braintree/client_api/client_token_spec.rb
161
+ - spec/integration/braintree/client_api/spec_helper.rb
162
+ - spec/integration/braintree/coinbase_spec.rb
204
163
  - spec/integration/braintree/credit_card_spec.rb
205
- - spec/integration/braintree/error_codes_spec.rb
206
- - spec/integration/braintree/us_bank_account_spec.rb
207
164
  - spec/integration/braintree/credit_card_verification_search_spec.rb
208
- - spec/integration/braintree/plan_spec.rb
209
- - spec/integration/braintree/http_spec.rb
165
+ - spec/integration/braintree/credit_card_verification_spec.rb
166
+ - spec/integration/braintree/customer_search_spec.rb
210
167
  - spec/integration/braintree/customer_spec.rb
211
- - spec/integration/braintree/merchant_spec.rb
212
- - spec/integration/braintree/transparent_redirect_spec.rb
213
168
  - spec/integration/braintree/disbursement_spec.rb
214
- - spec/integration/braintree/subscription_spec.rb
215
- - spec/integration/braintree/customer_search_spec.rb
216
- - spec/integration/braintree/transaction_spec.rb
217
- - spec/integration/braintree/add_on_spec.rb
218
- - spec/integration/braintree/transaction_search_spec.rb
219
- - spec/integration/braintree/address_spec.rb
169
+ - spec/integration/braintree/discount_spec.rb
170
+ - spec/integration/braintree/error_codes_spec.rb
171
+ - spec/integration/braintree/http_spec.rb
220
172
  - spec/integration/braintree/merchant_account_spec.rb
221
- - spec/integration/braintree/test/transaction_amounts_spec.rb
222
- - spec/integration/braintree/settlement_batch_summary_spec.rb
173
+ - spec/integration/braintree/merchant_spec.rb
174
+ - spec/integration/braintree/oauth_spec.rb
175
+ - spec/integration/braintree/payment_method_nonce_spec.rb
176
+ - spec/integration/braintree/payment_method_spec.rb
223
177
  - spec/integration/braintree/paypal_account_spec.rb
178
+ - spec/integration/braintree/plan_spec.rb
179
+ - spec/integration/braintree/settlement_batch_summary_spec.rb
180
+ - spec/integration/braintree/subscription_spec.rb
181
+ - spec/integration/braintree/test/transaction_amounts_spec.rb
224
182
  - spec/integration/braintree/test_transaction_spec.rb
225
- - spec/integration/braintree/discount_spec.rb
226
- - spec/integration/braintree/coinbase_spec.rb
227
- - spec/integration/braintree/payment_method_spec.rb
228
- - spec/integration/braintree/credit_card_verification_spec.rb
229
- - spec/integration/braintree/client_api/spec_helper.rb
230
- - spec/integration/braintree/client_api/client_token_spec.rb
231
- - spec/ssl/privateKey.key
232
- - spec/ssl/certificate.crt
233
- - spec/ssl/geotrust_global.crt
183
+ - spec/integration/braintree/transaction_search_spec.rb
184
+ - spec/integration/braintree/transaction_spec.rb
185
+ - spec/integration/braintree/transparent_redirect_spec.rb
186
+ - spec/integration/braintree/us_bank_account_spec.rb
187
+ - spec/integration/spec_helper.rb
188
+ - spec/oauth_test_helper.rb
189
+ - spec/script/httpsd.rb
234
190
  - spec/spec.opts
235
191
  - spec/spec_helper.rb
236
- - spec/client.sh
237
- - spec/hacks/tcp_socket.rb
238
- - spec/script/httpsd.rb
239
- - braintree.gemspec
192
+ - spec/ssl/certificate.crt
193
+ - spec/ssl/geotrust_global.crt
194
+ - spec/ssl/privateKey.key
195
+ - spec/unit/braintree/address_spec.rb
196
+ - spec/unit/braintree/apple_pay_card_spec.rb
197
+ - spec/unit/braintree/base_module_spec.rb
198
+ - spec/unit/braintree/client_token_spec.rb
199
+ - spec/unit/braintree/configuration_spec.rb
200
+ - spec/unit/braintree/credentials_parser_spec.rb
201
+ - spec/unit/braintree/credit_card_spec.rb
202
+ - spec/unit/braintree/credit_card_verification_search_spec.rb
203
+ - spec/unit/braintree/credit_card_verification_spec.rb
204
+ - spec/unit/braintree/customer_spec.rb
205
+ - spec/unit/braintree/digest_spec.rb
206
+ - spec/unit/braintree/disbursement_spec.rb
207
+ - spec/unit/braintree/dispute_spec.rb
208
+ - spec/unit/braintree/error_result_spec.rb
209
+ - spec/unit/braintree/errors_spec.rb
210
+ - spec/unit/braintree/http_spec.rb
211
+ - spec/unit/braintree/merchant_account_spec.rb
212
+ - spec/unit/braintree/modification_spec.rb
213
+ - spec/unit/braintree/payment_method_spec.rb
214
+ - spec/unit/braintree/paypal_account_spec.rb
215
+ - spec/unit/braintree/resource_collection_spec.rb
216
+ - spec/unit/braintree/risk_data_spec.rb
217
+ - spec/unit/braintree/sha256_digest_spec.rb
218
+ - spec/unit/braintree/signature_service_spec.rb
219
+ - spec/unit/braintree/subscription_search_spec.rb
220
+ - spec/unit/braintree/subscription_spec.rb
221
+ - spec/unit/braintree/successful_result_spec.rb
222
+ - spec/unit/braintree/three_d_secure_info_spec.rb
223
+ - spec/unit/braintree/transaction/credit_card_details_spec.rb
224
+ - spec/unit/braintree/transaction/customer_details_spec.rb
225
+ - spec/unit/braintree/transaction/deposit_details_spec.rb
226
+ - spec/unit/braintree/transaction_search_spec.rb
227
+ - spec/unit/braintree/transaction_spec.rb
228
+ - spec/unit/braintree/transparent_redirect_spec.rb
229
+ - spec/unit/braintree/unknown_payment_method_spec.rb
230
+ - spec/unit/braintree/us_bank_account_spec.rb
231
+ - spec/unit/braintree/util_spec.rb
232
+ - spec/unit/braintree/validation_error_collection_spec.rb
233
+ - spec/unit/braintree/validation_error_spec.rb
234
+ - spec/unit/braintree/webhook_notification_spec.rb
235
+ - spec/unit/braintree/xml/libxml_spec.rb
236
+ - spec/unit/braintree/xml/parser_spec.rb
237
+ - spec/unit/braintree/xml/rexml_spec.rb
238
+ - spec/unit/braintree/xml_spec.rb
239
+ - spec/unit/braintree_spec.rb
240
+ - spec/unit/spec_helper.rb
240
241
  homepage: http://www.braintreepayments.com/
241
242
  licenses:
242
243
  - MIT
@@ -247,17 +248,17 @@ require_paths:
247
248
  - lib
248
249
  required_ruby_version: !ruby/object:Gem::Requirement
249
250
  requirements:
250
- - - '>='
251
+ - - ">="
251
252
  - !ruby/object:Gem::Version
252
253
  version: '0'
253
254
  required_rubygems_version: !ruby/object:Gem::Requirement
254
255
  requirements:
255
- - - '>='
256
+ - - ">="
256
257
  - !ruby/object:Gem::Version
257
258
  version: '0'
258
259
  requirements: []
259
260
  rubyforge_project: braintree
260
- rubygems_version: 2.1.11
261
+ rubygems_version: 2.4.3
261
262
  signing_key:
262
263
  specification_version: 4
263
264
  summary: Braintree Gateway Ruby Client Library
data/spec/client.sh DELETED
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -e
3
-
4
- access_token="integratexxxxxx_xxxxxx_xxxxxx_xxxxxx_xx1"
5
- url=$1
6
-
7
- params="{
8
- \"type\": \"us_bank_account\",
9
- \"billing_address\": {
10
- \"street_address\": \"123 Ave\",
11
- \"region\": \"CA\",
12
- \"locality\": \"San Francisco\",
13
- \"postal_code\": \"94112\"
14
- },
15
- \"routing_number\": \"123456789\",
16
- \"account_number\": \"567891234\",
17
- \"account_type\": \"checking\",
18
- \"account_holder_name\": \"Dan Schulman\",
19
- \"account_description\": \"PayPal Checking - 1234\",
20
- \"ach_mandate\": {
21
- \"text\": \"\"
22
- }
23
- }"
24
-
25
- output=`curl -s -H "Content-type: application/json"\
26
- -H "Braintree-Version: 2015-11-01"\
27
- -H "Authorization: Bearer $access_token"\
28
- -d "$params"\
29
- -XPost "$url"`
30
-
31
- token=$(echo $output | ruby -e 'require "json";input=JSON.parse(STDIN.read);puts(input["data"]["id"])')
32
- echo $token
33
-