stripe 2.9.0 → 2.10.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.rb +1 -0
- data/lib/stripe/login_link.rb +9 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/openapi/fixtures.json +52 -28
- data/openapi/fixtures.yaml +46 -26
- data/openapi/spec2.json +8792 -4564
- data/openapi/spec2.yaml +3735 -1083
- data/test/stripe/api_resource_test.rb +3 -3
- data/test/stripe/login_link_test.rb +36 -0
- data/test/stripe/transfer_test.rb +2 -1
- metadata +5 -2
@@ -86,7 +86,7 @@ module Stripe
|
|
86
86
|
with(query: { "expand" => ["customer"] }).
|
87
87
|
to_return(body: JSON.generate(API_FIXTURES.fetch(:charge)))
|
88
88
|
|
89
|
-
ch = Stripe::Charge.retrieve({:id => 'ch_test_charge', :expand =>
|
89
|
+
ch = Stripe::Charge.retrieve({:id => 'ch_test_charge', :expand => :customer})
|
90
90
|
ch.refresh
|
91
91
|
end
|
92
92
|
|
@@ -99,7 +99,7 @@ module Stripe
|
|
99
99
|
to_return(body: JSON.generate(API_FIXTURES.fetch(:customer)))
|
100
100
|
|
101
101
|
customer = Stripe::Customer.retrieve('c_test_customer')
|
102
|
-
customer.sources.retrieve({:id => 'cc_test_card', :expand =>
|
102
|
+
customer.sources.retrieve({:id => 'cc_test_card', :expand => :customer})
|
103
103
|
end
|
104
104
|
|
105
105
|
context "when specifying per-object credentials" do
|
@@ -289,7 +289,7 @@ module Stripe
|
|
289
289
|
charges = Stripe::Charge.list.data
|
290
290
|
assert charges.kind_of? Array
|
291
291
|
assert charges[0].kind_of? Stripe::Charge
|
292
|
-
assert charges[0].
|
292
|
+
assert charges[0].source.kind_of?(Stripe::StripeObject)
|
293
293
|
end
|
294
294
|
|
295
295
|
should "passing in a stripe_account header should pass it through on call" do
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Stripe
|
4
|
+
class LoginLinkTest < Test::Unit::TestCase
|
5
|
+
FIXTURE = API_FIXTURES.fetch(:login_link)
|
6
|
+
|
7
|
+
setup do
|
8
|
+
account_fixture = API_FIXTURES.fetch(:account)
|
9
|
+
account_fixture = account_fixture.merge(
|
10
|
+
'login_links' => {
|
11
|
+
'data' => [],
|
12
|
+
'has_more' => false,
|
13
|
+
'object' => 'list',
|
14
|
+
'url' => "/v1/accounts/#{account_fixture[:id]}/login_links"
|
15
|
+
}
|
16
|
+
)
|
17
|
+
@account = Stripe::Account.construct_from(account_fixture)
|
18
|
+
end
|
19
|
+
|
20
|
+
should "not be retrievable" do
|
21
|
+
assert_raises NotImplementedError do
|
22
|
+
Stripe::LoginLink.retrieve('foo')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
should "be creatable" do
|
27
|
+
stub_request(:post, "#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links").
|
28
|
+
to_return(body: JSON.generate(FIXTURE))
|
29
|
+
|
30
|
+
login_link = @account.login_links.create
|
31
|
+
assert_requested :post,
|
32
|
+
"#{Stripe.api_base}/v1/accounts/#{@account.id}/login_links"
|
33
|
+
assert login_link.kind_of?(Stripe::LoginLink)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -20,7 +20,8 @@ module Stripe
|
|
20
20
|
should "be creatable" do
|
21
21
|
transfer = Stripe::Transfer.create(
|
22
22
|
amount: 100,
|
23
|
-
currency: "USD"
|
23
|
+
currency: "USD",
|
24
|
+
destination: API_FIXTURES.fetch(:account)[:id],
|
24
25
|
)
|
25
26
|
assert_requested :post, "#{Stripe.api_base}/v1/transfers"
|
26
27
|
assert transfer.kind_of?(Stripe::Transfer)
|
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.
|
4
|
+
version: 2.10.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-05-
|
11
|
+
date: 2017-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- lib/stripe/invoice_item.rb
|
76
76
|
- lib/stripe/invoice_line_item.rb
|
77
77
|
- lib/stripe/list_object.rb
|
78
|
+
- lib/stripe/login_link.rb
|
78
79
|
- lib/stripe/oauth.rb
|
79
80
|
- lib/stripe/order.rb
|
80
81
|
- lib/stripe/order_return.rb
|
@@ -129,6 +130,7 @@ files:
|
|
129
130
|
- test/stripe/invoice_line_item_test.rb
|
130
131
|
- test/stripe/invoice_test.rb
|
131
132
|
- test/stripe/list_object_test.rb
|
133
|
+
- test/stripe/login_link_test.rb
|
132
134
|
- test/stripe/oauth_test.rb
|
133
135
|
- test/stripe/order_return_test.rb
|
134
136
|
- test/stripe/order_test.rb
|
@@ -203,6 +205,7 @@ test_files:
|
|
203
205
|
- test/stripe/invoice_line_item_test.rb
|
204
206
|
- test/stripe/invoice_test.rb
|
205
207
|
- test/stripe/list_object_test.rb
|
208
|
+
- test/stripe/login_link_test.rb
|
206
209
|
- test/stripe/oauth_test.rb
|
207
210
|
- test/stripe/order_return_test.rb
|
208
211
|
- test/stripe/order_test.rb
|