stripe 2.12.0 → 3.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 138bd68271a0dcc818ac66088dfe0e1a21f5ca8c
4
- data.tar.gz: ce99f078d8a0628f7626e46fd80e932be769713e
3
+ metadata.gz: 390fa649e902fb6c709e2d803c92ffbf136a2384
4
+ data.tar.gz: 837bf7e6916a55a1feeaffcd41c4e713eb5ce92f
5
5
  SHA512:
6
- metadata.gz: 5df9b527715b1617a5944aef259c60125f5c1bfca2b70e226b728085b89d1c442e57205c993fd49185db170f8ff7ed299f33ea426d649499a1c5b007535c3114
7
- data.tar.gz: 00543a1e6dc6678b5ba8fdafb50781394efafc9f6f2b1aa57565b3052c2e1fed97b664d5e238c2e7731aee66f80d694a5761daaac5800a802893d0b686e3065b
6
+ metadata.gz: 635ac7d16f11b9ab531faf3f26f1d35e68947e18b92e5680656ce0963f99c910f5d8383f784895ae205a060740ac1540ab5b932da6ad2dc46cd99f8cb8c53163
7
+ data.tar.gz: 47eb2e2fcaf5cb7637456663229c7a28349eac275518d3749967d33c3025ac9a4f4df1e8eea570e7808b1def4ce89045b941e3a910ab64813128483b7677a4ef
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 3.0.0 2017-06-27
2
+
3
+ * `#pay` on invoice now takes params as well as opts
4
+
1
5
  === 2.12.0 2017-06-20
2
6
 
3
7
  * Add support for ephemeral keys
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.12.0
1
+ 3.0.0
@@ -11,8 +11,8 @@ module Stripe
11
11
  Util.convert_to_stripe_object(resp.data, opts)
12
12
  end
13
13
 
14
- def pay(opts={})
15
- resp, opts = request(:post, pay_url, {}, opts)
14
+ def pay(params={}, opts={})
15
+ resp, opts = request(:post, pay_url, params, opts)
16
16
  initialize_from(resp.data, opts)
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '2.12.0'
2
+ VERSION = '3.0.0'
3
3
  end
@@ -3,8 +3,6 @@ require File.expand_path('../../test_helper', __FILE__)
3
3
  module Stripe
4
4
  class EphemeralKeyTest < Test::Unit::TestCase
5
5
  context "#create" do
6
- FIXTURE = API_FIXTURES.fetch(:ephemeral_key_with_secret)
7
-
8
6
  should "succeed" do
9
7
  key = Stripe::EphemeralKey.create(
10
8
  {customer:"cus_123"},
@@ -72,8 +70,6 @@ module Stripe
72
70
  end
73
71
 
74
72
  context "#delete" do
75
- FIXTURE = API_FIXTURES.fetch(:ephemeral_key)
76
-
77
73
  should "succeed" do
78
74
  key = Stripe::EphemeralKey.create(
79
75
  {customer: 'cus_123'},
@@ -46,6 +46,19 @@ module Stripe
46
46
  "#{Stripe.api_base}/v1/invoices/#{FIXTURE[:id]}/pay"
47
47
  assert invoice.kind_of?(Stripe::Invoice)
48
48
  end
49
+
50
+ should "pay invoice with a specific source" do
51
+ invoice = Stripe::Invoice.retrieve(FIXTURE[:id])
52
+ invoice = invoice.pay(
53
+ source: API_FIXTURES[:customer][:sources][:data][0][:id]
54
+ )
55
+ assert_requested :post,
56
+ "#{Stripe.api_base}/v1/invoices/#{FIXTURE[:id]}/pay",
57
+ body: {
58
+ source: API_FIXTURES[:customer][:sources][:data][0][:id]
59
+ }
60
+ assert invoice.kind_of?(Stripe::Invoice)
61
+ end
49
62
  end
50
63
 
51
64
  context "#upcoming" do
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: 2.12.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-21 00:00:00.000000000 Z
11
+ date: 2017-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  requirements: []
179
179
  rubyforge_project:
180
- rubygems_version: 2.2.2
180
+ rubygems_version: 2.6.12
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: Ruby bindings for the Stripe API