stripe 1.47.0 → 1.48.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: 38d734e2601e619467a635e7119425d445a03a2f
4
- data.tar.gz: 5ed120c6302d916cf088484499741bd71eea15e0
3
+ metadata.gz: 675dcb4ab0fc09e68dd7926d6ce56decd3e71a4b
4
+ data.tar.gz: e4571dd914163a88dbfbc4a6402aa2980d277f23
5
5
  SHA512:
6
- metadata.gz: f8d03ef20097a5787b4a05637b6dfb8aa534457d1cfe85963d69f36611dadc515587d390c2d0b927769e3f9b6f619d010e4b4ba5b40bfbf687829e740abf0226
7
- data.tar.gz: 0b55c686a8669016b3d371b2586c5ece3174c597cfeeeca75f5cb0d6db21999c42f6171651ca484e9235cc8b05393b80ab78a3d9dcd6c353152bddb6abc1a0c9
6
+ metadata.gz: a66e47defb3869d715d1aeec330e1beb7ec0dc84499accd5899cdf874cacf495c6c4b4bbc0f408aa0ebcf49e089e4cbf41cf2955e591ecdedc597522d5dd694e
7
+ data.tar.gz: 8825267202f9e2281d1badc7f985c2a783b004165c4a164c36bb8e01ddf03b32f2ec3626cd6704d972883605963596d83ffa59f85ec2c818c455b24c01e2b8ec
@@ -1,3 +1,7 @@
1
+ === 1.48.0 2016-07-12
2
+
3
+ * Add `ThreeDSecure` model for 3-D secure payments
4
+
1
5
  === 1.47.0 2016-07-11
2
6
 
3
7
  * Allow rest-client version 2.0+ to be used with the gem
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.47.0
1
+ 1.48.0
@@ -55,6 +55,7 @@ require 'stripe/sku'
55
55
  require 'stripe/order'
56
56
  require 'stripe/order_return'
57
57
  require 'stripe/alipay_account'
58
+ require 'stripe/three_d_secure'
58
59
 
59
60
  # Errors
60
61
  require 'stripe/errors/stripe_error'
@@ -0,0 +1,13 @@
1
+ module Stripe
2
+ class ThreeDSecure < APIResource
3
+ extend Stripe::APIOperations::Create
4
+
5
+ def self.resource_url
6
+ "/v1/3d_secure"
7
+ end
8
+
9
+ def self.retrieve(id, opts=nil)
10
+ raise NotImplementedError.new("3D Secure objects cannot be retrieved")
11
+ end
12
+ end
13
+ end
@@ -53,6 +53,7 @@ module Stripe
53
53
  'sku' => SKU,
54
54
  'order' => Order,
55
55
  'order_return' => OrderReturn,
56
+ 'three_d_secure' => ThreeDSecure,
56
57
  }
57
58
  end
58
59
 
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.47.0'
2
+ VERSION = '1.48.0'
3
3
  end
@@ -0,0 +1,16 @@
1
+ require File.expand_path('../../test_helper', __FILE__)
2
+
3
+ module Stripe
4
+ class ThreeDSecureTest < Test::Unit::TestCase
5
+ should "create should return a new 3D Secure object" do
6
+ @mock.expects(:post).once.returns(make_response(make_three_d_secure))
7
+ tds = Stripe::ThreeDSecure.create(
8
+ :card => "tok_test",
9
+ :amount => 1500,
10
+ :currency => "usd",
11
+ :return_url => "https://example.org/3d-secure-result"
12
+ )
13
+ assert_equal "tdsrc_test", tds.id
14
+ end
15
+ end
16
+ end
@@ -833,5 +833,20 @@ module Stripe
833
833
  ]
834
834
  }
835
835
  end
836
+
837
+ def make_three_d_secure(params={})
838
+ {
839
+ :id => 'tdsrc_test',
840
+ :object => 'three_d_secure',
841
+ :amount => 1500,
842
+ :authenticate => true,
843
+ :card => make_card,
844
+ :created => 1456908210,
845
+ :currency => 'usd',
846
+ :livemode => false,
847
+ :redirect_url => nil,
848
+ :status => 'succeeded',
849
+ }.merge(params)
850
+ end
836
851
  end
837
852
  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.47.0
4
+ version: 1.48.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-11 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -94,6 +94,7 @@ files:
94
94
  - lib/stripe/sku.rb
95
95
  - lib/stripe/stripe_object.rb
96
96
  - lib/stripe/subscription.rb
97
+ - lib/stripe/three_d_secure.rb
97
98
  - lib/stripe/token.rb
98
99
  - lib/stripe/transfer.rb
99
100
  - lib/stripe/util.rb
@@ -132,6 +133,7 @@ files:
132
133
  - test/stripe/sku_test.rb
133
134
  - test/stripe/stripe_object_test.rb
134
135
  - test/stripe/subscription_test.rb
136
+ - test/stripe/three_d_secure_test.rb
135
137
  - test/stripe/transfer_test.rb
136
138
  - test/stripe/util_test.rb
137
139
  - test/stripe_test.rb
@@ -195,6 +197,7 @@ test_files:
195
197
  - test/stripe/sku_test.rb
196
198
  - test/stripe/stripe_object_test.rb
197
199
  - test/stripe/subscription_test.rb
200
+ - test/stripe/three_d_secure_test.rb
198
201
  - test/stripe/transfer_test.rb
199
202
  - test/stripe/util_test.rb
200
203
  - test/stripe_test.rb