paypal-sdk-subscriptions 0.1.0 → 0.2.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
  SHA256:
3
- metadata.gz: bf3c2ae219ecfbb92ab65651dc8872ff3910078ea184d0cbceb4fe2036ab5cc6
4
- data.tar.gz: 5ca7bbaaf031ae947f5e9be0dcbf262cae4e94f3b6cdb17fe12793dc67fdcbd8
3
+ metadata.gz: 5cb5267fe9055aad1c85e1648d3c9f7fc1a60dcc4a03cccc8b99bfa77c8f7da0
4
+ data.tar.gz: cc4d759a7d982f53fb91bb0ff2b4d5a6c0666aaf5c09fc19c244bd4ed6db4500
5
5
  SHA512:
6
- metadata.gz: a599da2bbdd4a8755c93f2c112e30abb3db51b065828851e8f1dca8ccfaf3c971df609475ba5780abd1fd08a997f2dcd14cf49b64fbc7f9d35c6dbf3d2794395
7
- data.tar.gz: 39cff813fad29d860455080b92ac9e00e7c63705ef72ebcc560a4013a07cabd51ca9c7ca3f88e6fde0bd58d14bc7954f4ebf31f697b7d49a775b4f92fb7117f3
6
+ metadata.gz: 1c1cd09e2d6a08dff39512650058850e473b5494b40fc66d1729ef1da7514f413b9412367a359f31a48cb2d386bd7fdd48e64654e567e6fab4705190e18563f1
7
+ data.tar.gz: 5a7f849e5cb993e363d3bca56e11912754eda55dccc0eb398d2a4e5c599a93d5a424180a72d2db0eac83228f24c72b7053e3e45ba8d5723989afb3c3f5444c1e
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Version ][rubygems_badge]][rubygems]
4
4
  [![Travis CI ][travis_badge]][travis]
5
5
 
6
- Missing PayPal REST SDK for [Subscriptions Management][subscriptions_full_integration] [released April 2019][release_notes].
6
+ Missing PayPal REST SDK for [Subscriptions Management][subscriptions_full_integration] as [released April 2019][release_notes].
7
7
 
8
8
  ## Installation
9
9
 
@@ -74,8 +74,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/varyon
74
74
 
75
75
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
76
76
 
77
- [rubygems_badge]: http://img.shields.io/gem/v/paypal-subscriptions-sdk-ruby.svg
78
- [rubygems]: https://rubygems.org/gems/paypal-subscriptions-sdk-ruby
77
+ [rubygems_badge]: http://img.shields.io/gem/v/paypal-sdk-subscriptions.svg
78
+ [rubygems]: https://rubygems.org/gems/paypal-sdk-subscriptions
79
79
  [travis_badge]: http://img.shields.io/travis/varyonic/paypal-subscriptions-sdk-ruby/master.svg
80
80
  [travis]: https://travis-ci.org/varyonic/paypal-subscriptions-sdk-ruby
81
81
 
@@ -75,10 +75,16 @@ module PayPal::SDK::Subscriptions
75
75
  end
76
76
  raise_on_api_error :cancel
77
77
 
78
- # @return [Hash] Transaction info
78
+ # @return [Transaction] Transaction info
79
79
  def capture(note, amount)
80
80
  payload = { amount: amount, note: note, capture_type: 'OUTSTANDING_BALANCE' }
81
- api.post("#{path(id)}/capture", payload, http_header)
81
+
82
+ response = api.post("#{path(id)}/capture", payload, http_header)
83
+
84
+ transaction = Transaction.new(response)
85
+ transaction.merge!(response)
86
+ transaction.raise_error!
87
+ transaction
82
88
  end
83
89
  raise_on_api_error :capture
84
90
 
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module Subscriptions
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal-sdk-subscriptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piers Chambers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-15 00:00:00.000000000 Z
11
+ date: 2019-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paypal-sdk-core