braintree 2.30.2 → 2.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/braintree/transaction.rb +6 -0
- data/lib/braintree/transaction_gateway.rb +2 -1
- data/lib/braintree/version.rb +2 -2
- data/spec/httpsd.pid +1 -1
- data/spec/integration/braintree/transaction_spec.rb +43 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0920f648b2941d40d8d030472510a465e51651c
|
4
|
+
data.tar.gz: 38529f3b6d7602c8b8cc415b8d9d5fab306987c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81bccd8f04b057be1947c3b18b6170d66b95c77c70c54ed78c207b116304c795472b4952feb93ba67c2317c0914de1054302dabdfa929e5388c3ac7f836dc489
|
7
|
+
data.tar.gz: 1018aee2f14759f670c03828537cc838d237ec6a5b624d5c65869ff5c2c978aebe761a1e01773c40815503a4d0b3ea00751090fc9612f4c284fc6290f11a6b65
|
@@ -128,7 +128,8 @@ module Braintree
|
|
128
128
|
},
|
129
129
|
{:options => [:hold_in_escrow, :store_in_vault, :store_in_vault_on_success, :submit_for_settlement, :add_billing_address_to_payment_method, :store_shipping_address_in_vault, :venmo_sdk_session]},
|
130
130
|
{:custom_fields => :_any_key_},
|
131
|
-
{:descriptor => [:name, :phone]}
|
131
|
+
{:descriptor => [:name, :phone]},
|
132
|
+
{:industry => [:industry_type, {:data => [:folio_number, :check_in_date, :check_out_date]}]}
|
132
133
|
]
|
133
134
|
end
|
134
135
|
|
data/lib/braintree/version.rb
CHANGED
data/spec/httpsd.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1058
|
@@ -136,6 +136,49 @@ describe Braintree::Transaction do
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
+
describe "industry data" do
|
140
|
+
it "accepts valid industry data" do
|
141
|
+
result = Braintree::Transaction.create(
|
142
|
+
:type => "sale",
|
143
|
+
:amount => 1_00,
|
144
|
+
:credit_card => {
|
145
|
+
:number => Braintree::Test::CreditCardNumbers::CardTypeIndicators::Prepaid,
|
146
|
+
:expiration_date => "05/2009"
|
147
|
+
},
|
148
|
+
:industry => {
|
149
|
+
:industry_type => Braintree::Transaction::IndustryType::Lodging,
|
150
|
+
:data => {
|
151
|
+
:folio_number => "ABCDEFG",
|
152
|
+
:check_in_date => "2014-06-01",
|
153
|
+
:check_out_date => "2014-06-30"
|
154
|
+
}
|
155
|
+
}
|
156
|
+
)
|
157
|
+
result.success?.should be_true
|
158
|
+
end
|
159
|
+
|
160
|
+
it "returns errors if validations on industry data fails" do
|
161
|
+
result = Braintree::Transaction.create(
|
162
|
+
:type => "sale",
|
163
|
+
:amount => 1_00,
|
164
|
+
:credit_card => {
|
165
|
+
:number => Braintree::Test::CreditCardNumbers::CardTypeIndicators::Prepaid,
|
166
|
+
:expiration_date => "05/2009"
|
167
|
+
},
|
168
|
+
:industry => {
|
169
|
+
:industry_type => Braintree::Transaction::IndustryType::Lodging,
|
170
|
+
:data => {
|
171
|
+
:folio_number => "foo bar",
|
172
|
+
:check_in_date => "2014-06-30",
|
173
|
+
:check_out_date => "2014-06-01"
|
174
|
+
}
|
175
|
+
}
|
176
|
+
)
|
177
|
+
result.success?.should be_false
|
178
|
+
result.errors.for(:transaction).for(:industry).map { |e| e.code }.sort.should == ["93403", "93406"]
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
139
182
|
it "returns a successful result if successful" do
|
140
183
|
result = Braintree::Transaction.create(
|
141
184
|
:type => "sale",
|
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.
|
4
|
+
version: 2.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Braintree
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project: braintree
|
207
|
-
rubygems_version: 2.2.
|
207
|
+
rubygems_version: 2.2.2
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Braintree Gateway Ruby Client Library
|