stripe 2.12.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe/invoice.rb +2 -2
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/ephemeral_key_test.rb +0 -4
- data/test/stripe/invoice_test.rb +13 -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: 390fa649e902fb6c709e2d803c92ffbf136a2384
|
4
|
+
data.tar.gz: 837bf7e6916a55a1feeaffcd41c4e713eb5ce92f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 635ac7d16f11b9ab531faf3f26f1d35e68947e18b92e5680656ce0963f99c910f5d8383f784895ae205a060740ac1540ab5b932da6ad2dc46cd99f8cb8c53163
|
7
|
+
data.tar.gz: 47eb2e2fcaf5cb7637456663229c7a28349eac275518d3749967d33c3025ac9a4f4df1e8eea570e7808b1def4ce89045b941e3a910ab64813128483b7677a4ef
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
data/lib/stripe/invoice.rb
CHANGED
@@ -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,
|
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
|
|
data/lib/stripe/version.rb
CHANGED
@@ -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'},
|
data/test/stripe/invoice_test.rb
CHANGED
@@ -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:
|
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-
|
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.
|
180
|
+
rubygems_version: 2.6.12
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: Ruby bindings for the Stripe API
|