braintree 2.75.0 → 2.76.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: 7add957a34ab8172520fbd04d8b0205c9dfb3b1e
4
- data.tar.gz: 6d2c78ae970aa3590e43427ddb4412ae3f8c5571
3
+ metadata.gz: f42a6a1794be0f659dc3cea9f5e84bff6e1d4e75
4
+ data.tar.gz: efdb9c09c2b5961fc4358af6f7d397ac4a304c53
5
5
  SHA512:
6
- metadata.gz: 3432c5ba3ddca0d3284a3565791b4623545a14ce90ca56219ce12fed6ccb7987611f6d0177ab4c10712749e15c830e9d0822406844ad860d924308c86d74c4ab
7
- data.tar.gz: 680e39fd812b590489921526c07d5deebc0fdfc3807d8e4e1f3d66ce48e97f50eeff3fed79de73b9d37d35c02f058077a704197b30b47b95d5fbfa011b6f4e9f
6
+ metadata.gz: aaea5122d23bf61d943af46e50bd768b70efcfb2aede98c857e2ae36c84851b9871dffccafbfadeafca384101ec0b9dee2a5d69bd7ec3c664228836a5ef2da0d
7
+ data.tar.gz: e10e87bb06504b7119ff25ae558422a12d6ff88f614580a30af194eb8985b9b6655fb94b3c5fe8d65d5be8d96ccb3fead07214a73e2c3ec289fc09946c4cf7df
@@ -4,9 +4,9 @@ module Braintree
4
4
 
5
5
  attr_reader :id, :email, :company_name, :country_code_alpha2, :country_code_alpha3, :country_code_numeric, :country_name, :merchant_accounts
6
6
 
7
- def initialize(attributes) # :nodoc:
7
+ def initialize(gateway, attributes) # :nodoc:
8
8
  @merchant_accounts = attributes.delete(:merchant_accounts).map do |merchant_account|
9
- MerchantAccount._new(Configuration.gateway, merchant_account)
9
+ MerchantAccount._new(gateway, merchant_account)
10
10
  end
11
11
 
12
12
  set_instance_variables_from_hash(attributes)
@@ -25,7 +25,7 @@ module Braintree
25
25
 
26
26
  if response.has_key?(:response) && response[:response][:merchant]
27
27
  Braintree::SuccessfulResult.new(
28
- :merchant => Merchant._new(response[:response][:merchant]),
28
+ :merchant => Merchant._new(@gateway, response[:response][:merchant]),
29
29
  :credentials => OAuthCredentials._new(response[:response][:credentials])
30
30
  )
31
31
  elsif response[:api_error_response]
@@ -1,7 +1,7 @@
1
1
  module Braintree
2
2
  module Version
3
3
  Major = 2
4
- Minor = 75
4
+ Minor = 76
5
5
  Tiny = 0
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Tiny}"
data/spec/httpsd.pid CHANGED
@@ -1 +1 @@
1
- 26882
1
+ 13345
@@ -52,6 +52,32 @@ describe Braintree::MerchantGateway do
52
52
  errors[0].code.should == Braintree::ErrorCodes::Merchant::PaymentMethodsAreInvalid
53
53
  end
54
54
 
55
+ context "credentials" do
56
+ around(:each) do |example|
57
+ old_merchant_id_value = Braintree::Configuration.merchant_id
58
+ example.run
59
+ Braintree::Configuration.merchant_id = old_merchant_id_value
60
+ end
61
+
62
+ it "allows using a merchant_id passed in through Gateway" do
63
+ Braintree::Configuration.merchant_id = nil
64
+
65
+ gateway = Braintree::Gateway.new(
66
+ :client_id => "client_id$#{Braintree::Configuration.environment}$integration_client_id",
67
+ :client_secret => "client_secret$#{Braintree::Configuration.environment}$integration_client_secret",
68
+ :merchant_id => "integration_merchant_id",
69
+ :logger => Logger.new("/dev/null"),
70
+ )
71
+ result = gateway.merchant.create(
72
+ :email => "name@email.com",
73
+ :country_code_alpha3 => "USA",
74
+ :payment_methods => ["credit_card", "paypal"]
75
+ )
76
+
77
+ result.should be_success
78
+ end
79
+ end
80
+
55
81
  context "multiple currencies" do
56
82
  before(:each) do
57
83
  @gateway = Braintree::Gateway.new(
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.75.0
4
+ version: 2.76.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braintree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
272
  version: '0'
273
273
  requirements: []
274
274
  rubyforge_project: braintree
275
- rubygems_version: 2.4.6
275
+ rubygems_version: 2.4.8
276
276
  signing_key:
277
277
  specification_version: 4
278
278
  summary: Braintree Gateway Ruby Client Library