braintree 2.27.0 → 2.27.1

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.
@@ -8,12 +8,16 @@ module Braintree
8
8
  Suspended = "suspended"
9
9
  end
10
10
 
11
- module FundingDestinations
11
+ module FundingDestination
12
12
  Bank = "bank"
13
13
  MobilePhone = "mobile_phone"
14
14
  Email = "email"
15
15
  end
16
16
 
17
+ module FundingDestinations
18
+ include Braintree::MerchantAccount::FundingDestination
19
+ end
20
+
17
21
  attr_reader :status, :id, :master_merchant_account,
18
22
  :individual_details, :business_details, :funding_details
19
23
 
@@ -2,7 +2,7 @@ module Braintree
2
2
  module Version
3
3
  Major = 2
4
4
  Minor = 27
5
- Tiny = 0
5
+ Tiny = 1
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Tiny}"
8
8
  end
@@ -50,7 +50,7 @@ VALID_APPLICATION_PARAMS = {
50
50
  }
51
51
  },
52
52
  :funding => {
53
- :destination => Braintree::MerchantAccount::FundingDestinations::Bank,
53
+ :destination => Braintree::MerchantAccount::FundingDestination::Bank,
54
54
  :routing_number => "011103093",
55
55
  :account_number => "43759348798"
56
56
  },
@@ -108,7 +108,7 @@ describe Braintree::MerchantAccount do
108
108
  context "funding destination" do
109
109
  it "accepts a bank" do
110
110
  params = VALID_APPLICATION_PARAMS.dup
111
- params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestinations::Bank
111
+ params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestination::Bank
112
112
  result = Braintree::MerchantAccount.create(params)
113
113
 
114
114
  result.should be_success
@@ -116,7 +116,7 @@ describe Braintree::MerchantAccount do
116
116
 
117
117
  it "accepts an email" do
118
118
  params = VALID_APPLICATION_PARAMS.dup
119
- params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestinations::Email
119
+ params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestination::Email
120
120
  params[:funding][:email] = "joebloggs@compuserve.com"
121
121
  result = Braintree::MerchantAccount.create(params)
122
122
 
@@ -125,7 +125,7 @@ describe Braintree::MerchantAccount do
125
125
 
126
126
  it "accepts a mobile_phone" do
127
127
  params = VALID_APPLICATION_PARAMS.dup
128
- params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestinations::MobilePhone
128
+ params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestination::MobilePhone
129
129
  params[:funding][:mobile_phone] = "3125882300"
130
130
  result = Braintree::MerchantAccount.create(params)
131
131
 
@@ -159,7 +159,7 @@ describe Braintree::MerchantAccount do
159
159
  params[:funding][:routing_number] = "071000013"
160
160
  params[:funding][:email] = "check@this.com"
161
161
  params[:funding][:mobile_phone] = "1234567890"
162
- params[:funding][:destination] = Braintree::MerchantAccount::FundingDestinations::MobilePhone
162
+ params[:funding][:destination] = Braintree::MerchantAccount::FundingDestination::MobilePhone
163
163
  result = Braintree::MerchantAccount.update("sandbox_sub_merchant_account", params)
164
164
  result.should be_success
165
165
  result.merchant_account.status.should == "active"
@@ -185,7 +185,7 @@ describe Braintree::MerchantAccount do
185
185
  result.merchant_account.funding_details.routing_number.should == "071000013"
186
186
  result.merchant_account.funding_details.email.should == "check@this.com"
187
187
  result.merchant_account.funding_details.mobile_phone.should == "1234567890"
188
- result.merchant_account.funding_details.destination.should == Braintree::MerchantAccount::FundingDestinations::MobilePhone
188
+ result.merchant_account.funding_details.destination.should == Braintree::MerchantAccount::FundingDestination::MobilePhone
189
189
  end
190
190
 
191
191
  it "does not require all fields" do
@@ -329,7 +329,7 @@ describe Braintree::MerchantAccount do
329
329
  result = Braintree::MerchantAccount.update(
330
330
  "sandbox_sub_merchant_account", {
331
331
  :funding => {
332
- :destination => Braintree::MerchantAccount::FundingDestinations::Bank,
332
+ :destination => Braintree::MerchantAccount::FundingDestination::Bank,
333
333
  :routing_number => "",
334
334
  :account_number => ""
335
335
  },
@@ -343,7 +343,7 @@ describe Braintree::MerchantAccount do
343
343
  result = Braintree::MerchantAccount.update(
344
344
  "sandbox_sub_merchant_account", {
345
345
  :funding => {
346
- :destination => Braintree::MerchantAccount::FundingDestinations::Email,
346
+ :destination => Braintree::MerchantAccount::FundingDestination::Email,
347
347
  :email => ""
348
348
  },
349
349
  }
@@ -355,7 +355,7 @@ describe Braintree::MerchantAccount do
355
355
  result = Braintree::MerchantAccount.update(
356
356
  "sandbox_sub_merchant_account", {
357
357
  :funding => {
358
- :destination => Braintree::MerchantAccount::FundingDestinations::MobilePhone,
358
+ :destination => Braintree::MerchantAccount::FundingDestination::MobilePhone,
359
359
  :mobile_phone => ""
360
360
  },
361
361
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.27.0
4
+ version: 2.27.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-04 00:00:00.000000000 Z
12
+ date: 2013-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -150,7 +150,6 @@ files:
150
150
  - spec/unit/braintree/transaction/credit_card_details_spec.rb
151
151
  - spec/unit/braintree/transaction_search_spec.rb
152
152
  - spec/unit/spec_helper.rb
153
- - spec/httpsd.pid
154
153
  - spec/integration/braintree/credit_card_spec.rb
155
154
  - spec/integration/braintree/add_on_spec.rb
156
155
  - spec/integration/braintree/plan_spec.rb
data/spec/httpsd.pid DELETED
@@ -1 +0,0 @@
1
- 10645