stripe 1.48.0 → 1.49.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: 675dcb4ab0fc09e68dd7926d6ce56decd3e71a4b
4
- data.tar.gz: e4571dd914163a88dbfbc4a6402aa2980d277f23
3
+ metadata.gz: b506b84477fa5aa5a394fbe5b0e5c4ae9d9c6faa
4
+ data.tar.gz: c0054ba7068128da43623e8012d7d8d43b305103
5
5
  SHA512:
6
- metadata.gz: a66e47defb3869d715d1aeec330e1beb7ec0dc84499accd5899cdf874cacf495c6c4b4bbc0f408aa0ebcf49e089e4cbf41cf2955e591ecdedc597522d5dd694e
7
- data.tar.gz: 8825267202f9e2281d1badc7f985c2a783b004165c4a164c36bb8e01ddf03b32f2ec3626cd6704d972883605963596d83ffa59f85ec2c818c455b24c01e2b8ec
6
+ metadata.gz: 482ee9b50887dcd48c5f11a708ce081173c447b57ed4826b2cf1d05d74c02eab2cd19578e84c68e1d607c4b9a5468c6650fe454fb1e524a70186530e43fbc057
7
+ data.tar.gz: d7b2f3436cf6bf226ecdf2c495a6a0b38d35cb93618482694201937ed7428442a3ee6bf351097b6cc6ac471e38f4ac83a3f879e3669197517b354633dc3fdf73
@@ -1,3 +1,7 @@
1
+ === 1.49.0 2016-07-28
2
+
3
+ * Add top-level `Source` model
4
+
1
5
  === 1.48.0 2016-07-12
2
6
 
3
7
  * Add `ThreeDSecure` model for 3-D secure payments
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Stripe Ruby Bindings [![Build Status](https://travis-ci.org/stripe/stripe-ruby.png?branch=master)](https://travis-ci.org/stripe/stripe-ruby)
1
+ # Stripe Ruby Bindings [![Build Status](https://travis-ci.org/stripe/stripe-ruby.svg?branch=master)](https://travis-ci.org/stripe/stripe-ruby)
2
2
 
3
3
  The Stripe Ruby bindings provide a small SDK for convenient access to the
4
4
  Stripe API from applications written in the Ruby language. It provides a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.48.0
1
+ 1.49.0
@@ -56,6 +56,7 @@ require 'stripe/order'
56
56
  require 'stripe/order_return'
57
57
  require 'stripe/alipay_account'
58
58
  require 'stripe/three_d_secure'
59
+ require 'stripe/source'
59
60
 
60
61
  # Errors
61
62
  require 'stripe/errors/stripe_error'
@@ -0,0 +1,11 @@
1
+ module Stripe
2
+ class Source < APIResource
3
+ include Stripe::APIOperations::Save
4
+ extend Stripe::APIOperations::List
5
+
6
+ def verify(params={}, opts={})
7
+ response, opts = request(:post, resource_url + '/verify', params, opts)
8
+ initialize_from(response, opts)
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.48.0'
2
+ VERSION = '1.49.0'
3
3
  end
@@ -0,0 +1,18 @@
1
+ require File.expand_path('../../test_helper', __FILE__)
2
+
3
+ module Stripe
4
+ class SourceTest < Test::Unit::TestCase
5
+ should 'be verifiable' do
6
+ source = Stripe::Source.construct_from({
7
+ :id => 'ba_foo',
8
+ })
9
+
10
+ @mock.expects(:post).
11
+ once.
12
+ with('https://api.stripe.com/v1/sources/ba_foo/verify', nil, 'amounts[]=1&amounts[]=2').
13
+ returns(make_response(:status => 'verified'))
14
+
15
+ source.verify(:amounts => [1,2])
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.48.0
4
+ version: 1.49.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -92,6 +92,7 @@ files:
92
92
  - lib/stripe/reversal.rb
93
93
  - lib/stripe/singleton_api_resource.rb
94
94
  - lib/stripe/sku.rb
95
+ - lib/stripe/source.rb
95
96
  - lib/stripe/stripe_object.rb
96
97
  - lib/stripe/subscription.rb
97
98
  - lib/stripe/three_d_secure.rb
@@ -131,6 +132,7 @@ files:
131
132
  - test/stripe/refund_test.rb
132
133
  - test/stripe/reversal_test.rb
133
134
  - test/stripe/sku_test.rb
135
+ - test/stripe/source_test.rb
134
136
  - test/stripe/stripe_object_test.rb
135
137
  - test/stripe/subscription_test.rb
136
138
  - test/stripe/three_d_secure_test.rb
@@ -195,6 +197,7 @@ test_files:
195
197
  - test/stripe/refund_test.rb
196
198
  - test/stripe/reversal_test.rb
197
199
  - test/stripe/sku_test.rb
200
+ - test/stripe/source_test.rb
198
201
  - test/stripe/stripe_object_test.rb
199
202
  - test/stripe/subscription_test.rb
200
203
  - test/stripe/three_d_secure_test.rb