stripe 5.11.0 → 5.12.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
  SHA256:
3
- metadata.gz: b4d7991b102059c94edfe2ad2e786cbc20f7272e6a18e4951dfeadadad782178
4
- data.tar.gz: c89b640616bde6d74cc0548ef5b50caa2d0cba7c27041aff53925c5ec004f4d7
3
+ metadata.gz: 55067d7f30895ad9f8db64722245e435ae1aefb70cb66f4a15ad21c377dab5c4
4
+ data.tar.gz: eeff6f15f2862e5cc91e5736ebbd48d8e32c67a1b8422227f82fcff30e9141c8
5
5
  SHA512:
6
- metadata.gz: 5bcbc102d23e255b3d262e1c0a765109de3e59be680a6a07fc08b28c799323e2b3f302148b7507c65bac7b2ed965c27c4a0074afc6d7c863f340738e012c2709
7
- data.tar.gz: e45905f9230f742137e78a03b63181a6d93b8190b71db615fd875359acd93630b9ad5a7ec003afc090f35e53a94cd1c1a5fbbf8e7db42a5999cbaf0ac8ea9c1b
6
+ metadata.gz: cc31ffaef1cbc83cda287389885cb89b0d0059f4f6b1f8b41d7061b69805912d32db132d87ec71ced2c64a9a9ae85701d906cc8aea8c4b16e9b427d7d7e63073
7
+ data.tar.gz: 9762eb9b7e2a2cbb27e11fe8a4b1a0b33399982784a54e451fc093a663c32237e3f6f72d2e6eadf6ae123adc8ef93da270ae8a7a07b86a25a3038a790cf0dda5
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.12.0 - 2020-01-02
4
+ * [#889](https://github.com/stripe/stripe-ruby/pull/889) Add support for retrieve source transaction API method
5
+
3
6
  ## 5.11.0 - 2019-11-26
4
7
  * [#885](https://github.com/stripe/stripe-ruby/pull/885) Add support for `CreditNote` preview
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.11.0
1
+ 5.12.0
@@ -10,7 +10,8 @@ module Stripe
10
10
 
11
11
  custom_method :verify, http_verb: :post
12
12
 
13
- nested_resource_class_methods :source_transaction, operations: %i[list]
13
+ nested_resource_class_methods :source_transaction,
14
+ operations: %i[retrieve list]
14
15
 
15
16
  def verify(params = {}, opts = {})
16
17
  request_stripe_object(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.11.0"
4
+ VERSION = "5.12.0"
5
5
  end
@@ -77,5 +77,33 @@ module Stripe
77
77
  assert source.is_a?(Stripe::Source)
78
78
  end
79
79
  end
80
+
81
+ context ".retrieve_source_transaction" do
82
+ should "retrieve a source transaction" do
83
+ Stripe::Source.retrieve_source_transaction(
84
+ "src_123",
85
+ "srctxn_123"
86
+ )
87
+ assert_requested :get, "#{Stripe.api_base}/v1/sources/src_123/source_transactions/srctxn_123"
88
+ end
89
+ end
90
+
91
+ context ".list_source_transactions" do
92
+ should "list source transactions" do
93
+ Stripe::Source.list_source_transactions(
94
+ "src_123"
95
+ )
96
+ assert_requested :get, "#{Stripe.api_base}/v1/sources/src_123/source_transactions"
97
+ end
98
+ end
99
+
100
+ context "#source_transactions" do
101
+ should "list source transactions" do
102
+ source = Stripe::Source.construct_from(id: "src_123",
103
+ object: "source")
104
+ source.source_transactions
105
+ assert_requested :get, "#{Stripe.api_base}/v1/sources/src_123/source_transactions"
106
+ end
107
+ end
80
108
  end
81
109
  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: 5.11.0
4
+ version: 5.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-26 00:00:00.000000000 Z
11
+ date: 2020-01-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.
@@ -139,7 +139,6 @@ files:
139
139
  - lib/stripe/version.rb
140
140
  - lib/stripe/webhook.rb
141
141
  - stripe.gemspec
142
- - test/api_stub_helpers.rb
143
142
  - test/openapi/README.md
144
143
  - test/stripe/account_link_test.rb
145
144
  - test/stripe/account_test.rb
@@ -203,7 +202,6 @@ files:
203
202
  - test/stripe/sigma/scheduled_query_run_test.rb
204
203
  - test/stripe/sku_test.rb
205
204
  - test/stripe/source_test.rb
206
- - test/stripe/source_transaction_test.rb
207
205
  - test/stripe/stripe_client_test.rb
208
206
  - test/stripe/stripe_object_test.rb
209
207
  - test/stripe/stripe_response_test.rb
@@ -251,12 +249,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
249
  - !ruby/object:Gem::Version
252
250
  version: '0'
253
251
  requirements: []
254
- rubygems_version: 3.0.6
252
+ rubygems_version: 3.1.2
255
253
  signing_key:
256
254
  specification_version: 4
257
255
  summary: Ruby bindings for the Stripe API
258
256
  test_files:
259
- - test/api_stub_helpers.rb
260
257
  - test/openapi/README.md
261
258
  - test/stripe/account_link_test.rb
262
259
  - test/stripe/account_test.rb
@@ -320,7 +317,6 @@ test_files:
320
317
  - test/stripe/sigma/scheduled_query_run_test.rb
321
318
  - test/stripe/sku_test.rb
322
319
  - test/stripe/source_test.rb
323
- - test/stripe/source_transaction_test.rb
324
320
  - test/stripe/stripe_client_test.rb
325
321
  - test/stripe/stripe_object_test.rb
326
322
  - test/stripe/stripe_response_test.rb
@@ -1 +0,0 @@
1
- # frozen_string_literal: true
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require ::File.expand_path("../test_helper", __dir__)
4
-
5
- module Stripe
6
- class SourceTransactionTest < Test::Unit::TestCase
7
- setup do
8
- @source = Stripe::Source.retrieve("src_123")
9
- end
10
-
11
- should "be listable (DEPRECATED)" do
12
- transactions = @source.source_transactions
13
-
14
- assert_requested :get, "#{Stripe.api_base}/v1/sources/#{@source.id}/source_transactions"
15
- assert transactions.data.is_a?(Array)
16
- assert transactions.first.is_a?(Stripe::SourceTransaction)
17
- end
18
-
19
- should "be listable" do
20
- transactions = Stripe::Source.list_source_transactions(@source.id)
21
-
22
- assert_requested :get, "#{Stripe.api_base}/v1/sources/#{@source.id}/source_transactions"
23
- assert transactions.data.is_a?(Array)
24
- assert transactions.first.is_a?(Stripe::SourceTransaction)
25
- end
26
- end
27
- end