braintree 2.41.0 → 2.42.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,10 @@ module Braintree
21
21
  @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
22
22
  end
23
23
 
24
+ def default?
25
+ @default
26
+ end
27
+
24
28
  class << self
25
29
  protected :new
26
30
  end
@@ -16,5 +16,10 @@ module Braintree
16
16
  def self._new(*args) # :nodoc:
17
17
  self.new *args
18
18
  end
19
+
20
+ # Returns true if this coinbase account is the customer's default payment method.
21
+ def default?
22
+ @default
23
+ end
19
24
  end
20
25
  end
@@ -3,5 +3,7 @@ module Braintree
3
3
  PayPalAccount = 'paypal_account'
4
4
  EuropeBankAccount = 'europe_bank_account'
5
5
  CreditCard = 'credit_card'
6
+ CoinbaseAccount = 'coinbase_account'
7
+ ApplePayCard = 'apple_pay_card'
6
8
  end
7
9
  end
@@ -9,6 +9,7 @@ module Braintree
9
9
  ApplePayMasterCard = "fake-apple-pay-mastercard-nonce"
10
10
  ApplePayAmEx = "fake-apple-pay-amex-nonce"
11
11
  AbstractTransactable = "fake-abstract-transactable-nonce"
12
+ Europe = "fake-europe-bank-account-nonce"
12
13
  Coinbase = "fake-coinbase-nonce"
13
14
  end
14
15
  end
@@ -1,7 +1,7 @@
1
1
  module Braintree
2
2
  module Version
3
3
  Major = 2
4
- Minor = 41
4
+ Minor = 42
5
5
  Tiny = 0
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Tiny}"
data/spec/httpsd.pid CHANGED
@@ -1 +1 @@
1
- 20677
1
+ 21452
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
+
3
+ describe Braintree::ApplePayCard do
4
+ describe "default?" do
5
+ it "is true if the Apple pay card is the default payment method for the customer" do
6
+ Braintree::ApplePayCard._new(:gateway, :default => true).default?.should == true
7
+ end
8
+
9
+ it "is false if the Apple pay card is not the default payment methodfor the customer" do
10
+ Braintree::ApplePayCard._new(:gateway, :default => false).default?.should == false
11
+ end
12
+ end
13
+ end
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.41.0
4
+ version: 2.42.0
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: 2015-03-30 00:00:00.000000000 Z
12
+ date: 2015-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -35,187 +35,188 @@ extra_rdoc_files: []
35
35
  files:
36
36
  - README.rdoc
37
37
  - LICENSE
38
- - lib/braintree/successful_result.rb
39
- - lib/braintree/exceptions.rb
40
- - lib/braintree/version.rb
41
- - lib/braintree/credit_card_gateway.rb
42
- - lib/braintree/europe_bank_account.rb
43
- - lib/braintree/base_module.rb
44
- - lib/braintree/subscription_search.rb
45
- - lib/braintree/paypal_account.rb
46
- - lib/braintree/signature_service.rb
47
- - lib/braintree/client_token.rb
48
- - lib/braintree/validation_error.rb
49
- - lib/braintree/testing_gateway.rb
50
- - lib/braintree/webhook_notification.rb
51
- - lib/braintree/http.rb
52
- - lib/braintree/webhook_notification_gateway.rb
53
- - lib/braintree/transparent_redirect_gateway.rb
54
- - lib/braintree/subscription/status_details.rb
55
- - lib/braintree/subscription_gateway.rb
56
- - lib/braintree/customer.rb
57
- - lib/braintree/test_transaction.rb
58
- - lib/braintree/credit_card_verification_gateway.rb
59
- - lib/braintree/transparent_redirect.rb
60
- - lib/braintree/payment_method_nonce.rb
61
- - lib/braintree/payment_method_gateway.rb
38
+ - lib/braintree/customer_search.rb
39
+ - lib/braintree/descriptor.rb
40
+ - lib/braintree/merchant_account.rb
41
+ - lib/braintree/credit_card.rb
62
42
  - lib/braintree/disbursement.rb
63
- - lib/braintree/subscription.rb
64
- - lib/braintree/discount_gateway.rb
65
- - lib/braintree/error_codes.rb
66
- - lib/braintree/coinbase_account.rb
67
- - lib/braintree/sha256_digest.rb
43
+ - lib/braintree/payment_method_gateway.rb
44
+ - lib/braintree/test/merchant_account.rb
45
+ - lib/braintree/test/credit_card.rb
46
+ - lib/braintree/test/venmo_sdk.rb
47
+ - lib/braintree/test/transaction_amounts.rb
48
+ - lib/braintree/test/nonce.rb
68
49
  - lib/braintree/transaction.rb
69
- - lib/braintree/util.rb
70
- - lib/braintree/discount.rb
71
- - lib/braintree/europe_bank_account_gateway.rb
72
- - lib/braintree/plan.rb
73
- - lib/braintree/risk_data.rb
74
- - lib/braintree/plan_gateway.rb
75
- - lib/braintree/webhook_testing_gateway.rb
76
- - lib/braintree/merchant_account_gateway.rb
77
- - lib/braintree/settlement_batch_summary_gateway.rb
78
- - lib/braintree/settlement_batch_summary.rb
79
- - lib/braintree/resource_collection.rb
80
- - lib/braintree/dispute.rb
50
+ - lib/braintree/version.rb
51
+ - lib/braintree/credit_card_verification_search.rb
81
52
  - lib/braintree/transaction_search.rb
82
- - lib/braintree/digest.rb
53
+ - lib/braintree/exceptions.rb
54
+ - lib/braintree/risk_data.rb
55
+ - lib/braintree/address/country_names.rb
83
56
  - lib/braintree/address_gateway.rb
84
- - lib/braintree/transaction/address_details.rb
57
+ - lib/braintree/dispute.rb
58
+ - lib/braintree/advanced_search.rb
59
+ - lib/braintree/webhook_notification_gateway.rb
60
+ - lib/braintree/customer_gateway.rb
61
+ - lib/braintree/apple_pay_card.rb
62
+ - lib/braintree/paypal_account.rb
63
+ - lib/braintree/europe_bank_account.rb
64
+ - lib/braintree/transaction/subscription_details.rb
85
65
  - lib/braintree/transaction/disbursement_details.rb
86
- - lib/braintree/transaction/credit_card_details.rb
87
- - lib/braintree/transaction/status_details.rb
66
+ - lib/braintree/transaction/address_details.rb
88
67
  - lib/braintree/transaction/customer_details.rb
89
68
  - lib/braintree/transaction/coinbase_details.rb
90
69
  - lib/braintree/transaction/apple_pay_details.rb
91
- - lib/braintree/transaction/subscription_details.rb
70
+ - lib/braintree/transaction/status_details.rb
71
+ - lib/braintree/transaction/credit_card_details.rb
92
72
  - lib/braintree/transaction/paypal_details.rb
93
- - lib/braintree/payment_method_nonce_gateway.rb
94
- - lib/braintree/credit_card_verification.rb
95
- - lib/braintree/modification.rb
96
- - lib/braintree/apple_pay_card.rb
97
- - lib/braintree/webhook_testing.rb
98
- - lib/braintree/merchant_account.rb
73
+ - lib/braintree/client_token.rb
74
+ - lib/braintree/xml.rb
99
75
  - lib/braintree/add_on.rb
76
+ - lib/braintree/add_on_gateway.rb
77
+ - lib/braintree/europe_bank_account_gateway.rb
78
+ - lib/braintree/settlement_batch_summary.rb
79
+ - lib/braintree/payment_method_nonce.rb
80
+ - lib/braintree/subscription.rb
81
+ - lib/braintree/http.rb
82
+ - lib/braintree/modification.rb
83
+ - lib/braintree/dispute/transaction_details.rb
84
+ - lib/braintree/gateway.rb
85
+ - lib/braintree/subscription_search.rb
86
+ - lib/braintree/credit_card_gateway.rb
87
+ - lib/braintree/payment_method.rb
88
+ - lib/braintree/base_module.rb
89
+ - lib/braintree/discount.rb
90
+ - lib/braintree/transparent_redirect.rb
91
+ - lib/braintree/transparent_redirect_gateway.rb
92
+ - lib/braintree/validation_error_collection.rb
93
+ - lib/braintree/paypal_account_gateway.rb
94
+ - lib/braintree/digest.rb
95
+ - lib/braintree/test_transaction.rb
96
+ - lib/braintree/subscription_gateway.rb
97
+ - lib/braintree/customer.rb
98
+ - lib/braintree/xml/generator.rb
99
+ - lib/braintree/xml/rexml.rb
100
100
  - lib/braintree/xml/libxml.rb
101
101
  - lib/braintree/xml/parser.rb
102
- - lib/braintree/xml/rexml.rb
103
- - lib/braintree/xml/generator.rb
104
- - lib/braintree/unknown_payment_method.rb
105
- - lib/braintree/errors.rb
106
- - lib/braintree/credit_card_verification_search.rb
107
- - lib/braintree/merchant_account/address_details.rb
102
+ - lib/braintree/webhook_notification.rb
103
+ - lib/braintree/error_codes.rb
104
+ - lib/braintree/webhook_testing_gateway.rb
105
+ - lib/braintree/address.rb
108
106
  - lib/braintree/merchant_account/individual_details.rb
107
+ - lib/braintree/merchant_account/address_details.rb
109
108
  - lib/braintree/merchant_account/funding_details.rb
110
109
  - lib/braintree/merchant_account/business_details.rb
111
- - lib/braintree/add_on_gateway.rb
112
- - lib/braintree/client_token_gateway.rb
113
- - lib/braintree/transaction_gateway.rb
114
- - lib/braintree/credit_card.rb
115
- - lib/braintree/settlement_batch.rb
116
- - lib/braintree/descriptor.rb
117
- - lib/braintree/customer_gateway.rb
118
110
  - lib/braintree/configuration.rb
119
- - lib/braintree/paypal_account_gateway.rb
120
- - lib/braintree/xml.rb
121
- - lib/braintree/advanced_search.rb
122
- - lib/braintree/payment_instrument_type.rb
123
- - lib/braintree/dispute/transaction_details.rb
111
+ - lib/braintree/credit_card_verification_gateway.rb
112
+ - lib/braintree/coinbase_account.rb
113
+ - lib/braintree/validation_error.rb
114
+ - lib/braintree/unknown_payment_method.rb
115
+ - lib/braintree/signature_service.rb
124
116
  - lib/braintree/error_result.rb
125
- - lib/braintree/customer_search.rb
126
- - lib/braintree/gateway.rb
127
- - lib/braintree/test/transaction_amounts.rb
128
- - lib/braintree/test/nonce.rb
129
- - lib/braintree/test/merchant_account.rb
130
- - lib/braintree/test/venmo_sdk.rb
131
- - lib/braintree/test/credit_card.rb
132
- - lib/braintree/payment_method.rb
133
- - lib/braintree/address/country_names.rb
134
- - lib/braintree/address.rb
135
- - lib/braintree/validation_error_collection.rb
117
+ - lib/braintree/credit_card_verification.rb
118
+ - lib/braintree/successful_result.rb
119
+ - lib/braintree/settlement_batch_summary_gateway.rb
120
+ - lib/braintree/resource_collection.rb
121
+ - lib/braintree/plan.rb
122
+ - lib/braintree/subscription/status_details.rb
123
+ - lib/braintree/payment_method_nonce_gateway.rb
124
+ - lib/braintree/util.rb
125
+ - lib/braintree/errors.rb
126
+ - lib/braintree/discount_gateway.rb
127
+ - lib/braintree/settlement_batch.rb
128
+ - lib/braintree/testing_gateway.rb
129
+ - lib/braintree/webhook_testing.rb
130
+ - lib/braintree/merchant_account_gateway.rb
131
+ - lib/braintree/sha256_digest.rb
132
+ - lib/braintree/client_token_gateway.rb
133
+ - lib/braintree/plan_gateway.rb
134
+ - lib/braintree/payment_instrument_type.rb
135
+ - lib/braintree/transaction_gateway.rb
136
136
  - lib/braintree.rb
137
- - lib/ssl/api_braintreegateway_com.ca.crt
138
- - lib/ssl/sandbox_braintreegateway_com.ca.crt
139
137
  - lib/ssl/www_braintreegateway_com.ca.crt
138
+ - lib/ssl/api_braintreegateway_com.ca.crt
140
139
  - lib/ssl/securetrust_ca.crt
140
+ - lib/ssl/sandbox_braintreegateway_com.ca.crt
141
141
  - spec/hacks/tcp_socket.rb
142
- - spec/ssl/certificate.crt
143
- - spec/ssl/privateKey.key
144
- - spec/ssl/geotrust_global.crt
145
142
  - spec/httpsd.pid
146
- - spec/spec.opts
147
- - spec/script/httpsd.rb
148
- - spec/integration/braintree/http_spec.rb
149
- - spec/integration/braintree/coinbase_spec.rb
143
+ - spec/integration/braintree/test_transaction_spec.rb
144
+ - spec/integration/braintree/subscription_spec.rb
145
+ - spec/integration/braintree/test/transaction_amounts_spec.rb
146
+ - spec/integration/braintree/plan_spec.rb
147
+ - spec/integration/braintree/add_on_spec.rb
148
+ - spec/integration/braintree/client_api/spec_helper.rb
149
+ - spec/integration/braintree/client_api/client_token_spec.rb
150
+ - spec/integration/braintree/advanced_search_spec.rb
151
+ - spec/integration/braintree/customer_spec.rb
150
152
  - spec/integration/braintree/transaction_spec.rb
151
- - spec/integration/braintree/credit_card_verification_spec.rb
152
- - spec/integration/braintree/credit_card_spec.rb
153
+ - spec/integration/braintree/address_spec.rb
154
+ - spec/integration/braintree/settlement_batch_summary_spec.rb
155
+ - spec/integration/braintree/coinbase_spec.rb
153
156
  - spec/integration/braintree/merchant_account_spec.rb
157
+ - spec/integration/braintree/customer_search_spec.rb
154
158
  - spec/integration/braintree/disbursement_spec.rb
155
- - spec/integration/braintree/payment_method_spec.rb
156
- - spec/integration/braintree/customer_spec.rb
157
159
  - spec/integration/braintree/error_codes_spec.rb
158
160
  - spec/integration/braintree/payment_method_nonce_spec.rb
159
- - spec/integration/braintree/customer_search_spec.rb
160
- - spec/integration/braintree/add_on_spec.rb
161
+ - spec/integration/braintree/payment_method_spec.rb
162
+ - spec/integration/braintree/credit_card_verification_search_spec.rb
163
+ - spec/integration/braintree/http_spec.rb
161
164
  - spec/integration/braintree/transparent_redirect_spec.rb
162
- - spec/integration/braintree/address_spec.rb
163
- - spec/integration/braintree/client_api/client_token_spec.rb
164
- - spec/integration/braintree/client_api/spec_helper.rb
165
165
  - spec/integration/braintree/paypal_account_spec.rb
166
- - spec/integration/braintree/settlement_batch_summary_spec.rb
167
- - spec/integration/braintree/advanced_search_spec.rb
168
- - spec/integration/braintree/subscription_spec.rb
169
- - spec/integration/braintree/transaction_search_spec.rb
170
- - spec/integration/braintree/plan_spec.rb
166
+ - spec/integration/braintree/credit_card_verification_spec.rb
171
167
  - spec/integration/braintree/discount_spec.rb
172
- - spec/integration/braintree/credit_card_verification_search_spec.rb
173
- - spec/integration/braintree/test/transaction_amounts_spec.rb
174
- - spec/integration/braintree/test_transaction_spec.rb
168
+ - spec/integration/braintree/credit_card_spec.rb
169
+ - spec/integration/braintree/transaction_search_spec.rb
175
170
  - spec/integration/spec_helper.rb
176
- - spec/spec_helper.rb
177
- - spec/unit/braintree/http_spec.rb
178
- - spec/unit/braintree/resource_collection_spec.rb
179
- - spec/unit/braintree/subscription_search_spec.rb
180
- - spec/unit/braintree/sha256_digest_spec.rb
171
+ - spec/spec.opts
172
+ - spec/unit/braintree_spec.rb
173
+ - spec/unit/braintree/subscription_spec.rb
181
174
  - spec/unit/braintree/error_result_spec.rb
182
- - spec/unit/braintree/transaction_spec.rb
183
- - spec/unit/braintree/validation_error_spec.rb
184
- - spec/unit/braintree/dispute_spec.rb
185
- - spec/unit/braintree/xml_spec.rb
186
- - spec/unit/braintree/credit_card_verification_spec.rb
187
- - spec/unit/braintree/credit_card_spec.rb
188
- - spec/unit/braintree/merchant_account_spec.rb
189
- - spec/unit/braintree/disbursement_spec.rb
190
- - spec/unit/braintree/payment_method_spec.rb
191
- - spec/unit/braintree/customer_spec.rb
192
- - spec/unit/braintree/base_module_spec.rb
193
- - spec/unit/braintree/transparent_redirect_spec.rb
194
- - spec/unit/braintree/unknown_payment_method_spec.rb
195
- - spec/unit/braintree/transaction/credit_card_details_spec.rb
196
175
  - spec/unit/braintree/transaction/deposit_details_spec.rb
197
176
  - spec/unit/braintree/transaction/customer_details_spec.rb
198
- - spec/unit/braintree/address_spec.rb
177
+ - spec/unit/braintree/transaction/credit_card_details_spec.rb
178
+ - spec/unit/braintree/validation_error_collection_spec.rb
199
179
  - spec/unit/braintree/errors_spec.rb
200
- - spec/unit/braintree/util_spec.rb
201
- - spec/unit/braintree/signature_service_spec.rb
202
- - spec/unit/braintree/paypal_account_spec.rb
180
+ - spec/unit/braintree/apple_pay_card_spec.rb
181
+ - spec/unit/braintree/modification_spec.rb
182
+ - spec/unit/braintree/sha256_digest_spec.rb
183
+ - spec/unit/braintree/customer_spec.rb
184
+ - spec/unit/braintree/unknown_payment_method_spec.rb
185
+ - spec/unit/braintree/transaction_spec.rb
186
+ - spec/unit/braintree/address_spec.rb
187
+ - spec/unit/braintree/base_module_spec.rb
188
+ - spec/unit/braintree/configuration_spec.rb
189
+ - spec/unit/braintree/xml_spec.rb
190
+ - spec/unit/braintree/resource_collection_spec.rb
203
191
  - spec/unit/braintree/digest_spec.rb
204
- - spec/unit/braintree/xml/rexml_spec.rb
205
192
  - spec/unit/braintree/xml/parser_spec.rb
193
+ - spec/unit/braintree/xml/rexml_spec.rb
206
194
  - spec/unit/braintree/xml/libxml_spec.rb
195
+ - spec/unit/braintree/util_spec.rb
207
196
  - spec/unit/braintree/client_token_spec.rb
197
+ - spec/unit/braintree/merchant_account_spec.rb
198
+ - spec/unit/braintree/signature_service_spec.rb
199
+ - spec/unit/braintree/disbursement_spec.rb
200
+ - spec/unit/braintree/payment_method_spec.rb
201
+ - spec/unit/braintree/credit_card_verification_search_spec.rb
202
+ - spec/unit/braintree/http_spec.rb
203
+ - spec/unit/braintree/validation_error_spec.rb
204
+ - spec/unit/braintree/transparent_redirect_spec.rb
205
+ - spec/unit/braintree/paypal_account_spec.rb
206
+ - spec/unit/braintree/subscription_search_spec.rb
208
207
  - spec/unit/braintree/webhook_notification_spec.rb
209
- - spec/unit/braintree/subscription_spec.rb
210
- - spec/unit/braintree/validation_error_collection_spec.rb
208
+ - spec/unit/braintree/dispute_spec.rb
209
+ - spec/unit/braintree/credit_card_verification_spec.rb
211
210
  - spec/unit/braintree/risk_data_spec.rb
212
- - spec/unit/braintree/configuration_spec.rb
213
- - spec/unit/braintree/transaction_search_spec.rb
214
- - spec/unit/braintree/modification_spec.rb
215
211
  - spec/unit/braintree/successful_result_spec.rb
216
- - spec/unit/braintree/credit_card_verification_search_spec.rb
217
- - spec/unit/braintree_spec.rb
212
+ - spec/unit/braintree/credit_card_spec.rb
213
+ - spec/unit/braintree/transaction_search_spec.rb
218
214
  - spec/unit/spec_helper.rb
215
+ - spec/script/httpsd.rb
216
+ - spec/spec_helper.rb
217
+ - spec/ssl/geotrust_global.crt
218
+ - spec/ssl/privateKey.key
219
+ - spec/ssl/certificate.crt
219
220
  - braintree.gemspec
220
221
  homepage: http://www.braintreepayments.com/
221
222
  licenses:
@@ -238,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
239
  version: '0'
239
240
  requirements: []
240
241
  rubyforge_project: braintree
241
- rubygems_version: 1.8.23
242
+ rubygems_version: 1.8.24
242
243
  signing_key:
243
244
  specification_version: 3
244
245
  summary: Braintree Gateway Ruby Client Library