paypal-sdk-subscriptions 0.3.1 → 0.4.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: a24cedc81cecd84a752734ebd824a023c5b438332cd50326316ab7630cb39d86
4
- data.tar.gz: 8e02b3b3b28408f52880dd4a009601eaf538fa8861a328dedf1fd814bdf5a704
3
+ metadata.gz: '09c464a43ec6877eb5a39da4e42abf5f0cfe2e00f968a199cebd252ee17ec73d'
4
+ data.tar.gz: b0d9d976b00dc49916af0c103378ca745e299ca86cccd359c05e0378f1694f77
5
5
  SHA512:
6
- metadata.gz: ee7e5a1ad50974565bc5459227a59b2e718303aa01793a2cc4f259c390a7f7932a61fb5e82bcdab2f8afba02517b5d86161a4550905ab278f668e1118d48dba1
7
- data.tar.gz: 67fcadb367f72248f1c9b5558e997c32f855722c32f6312ef54ae9ea4f993ff0c125790f7c69542c935aa1ef8c85afd1b4d9c2017967f21fc77e833dd06d51b9
6
+ metadata.gz: 710e1e155a7f6d44fe47b46469031dae9af1c08212b3c26a9882650f7f5564f3e2f051ad88fb1e1eb2eeb998ece39fb683efd0daf8ac3b3c65e7a800a4aefca5
7
+ data.tar.gz: ebee7bd9dd475774918b43bc1b9c61d32123819684dcf76e38b8d89caa53e29b7a183ab5e1f65d8f83a3816546bfd0dd5660510e6906af5ee39280be983ec5db
@@ -0,0 +1,29 @@
1
+ ---
2
+
3
+ name: ci
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test:
9
+ name: test
10
+ env:
11
+ client_id: ${{ secrets.CLIENT_ID }}
12
+ client_secret: ${{ secrets.CLIENT_SECRET }}
13
+
14
+ runs-on: ubuntu-latest
15
+
16
+ strategy:
17
+ matrix:
18
+ ruby: [{ name: 3.1, value: 3.1.4 }, { name: 3.2, value: 3.2.5 }]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: ${{ matrix.ruby.value }}
26
+ bundler-cache: true
27
+
28
+ - name: Run tests
29
+ run: bundle exec rspec
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PayPal REST SDK for Subscriptions Management
2
2
 
3
3
  [![Version ][rubygems_badge]][rubygems]
4
- [![Travis CI ][travis_badge]][travis]
4
+ [![Github Actions ][actions_badge]][actions]
5
5
 
6
6
  Missing PayPal REST SDK for [Subscriptions Management][subscriptions_full_integration] as [released April 2019][release_notes].
7
7
 
@@ -76,8 +76,8 @@ The gem is available as open source under the terms of the [MIT License](https:/
76
76
 
77
77
  [rubygems_badge]: http://img.shields.io/gem/v/paypal-sdk-subscriptions.svg
78
78
  [rubygems]: https://rubygems.org/gems/paypal-sdk-subscriptions
79
- [travis_badge]: http://img.shields.io/travis/varyonic/paypal-subscriptions-sdk-ruby/master.svg
80
- [travis]: https://travis-ci.org/varyonic/paypal-subscriptions-sdk-ruby
79
+ [actions_badge]: https://github.com/paypal-merchants-rb/paypal-subscriptions-sdk-ruby/workflows/ci/badge.svg
80
+ [actions]: https://github.com/paypal-merchants-rb/paypal-subscriptions-sdk-ruby/actions
81
81
 
82
82
  [release_notes]: https://developer.paypal.com/docs/release-notes/release-notes-2019/#april
83
83
  [subscriptions_full_integration]: https://developer.paypal.com/docs/subscriptions/full-integration/subscription-management/
@@ -95,13 +95,21 @@ module PayPal::SDK::Subscriptions
95
95
  object_of :create_time, DateTime
96
96
  array_of :links, Link
97
97
 
98
- def activate
99
- commit("#{path(id)}/activate")
98
+ def activate(note=nil)
99
+ if note
100
+ commit("#{path(id)}/activate", reason: note)
101
+ else
102
+ commit("#{path(id)}/activate")
103
+ end
100
104
  end
101
105
  raise_on_api_error :activate
102
106
 
103
- def cancel
104
- commit("#{path(id)}/cancel")
107
+ def cancel(note=nil)
108
+ if note
109
+ commit("#{path(id)}/cancel", reason: note)
110
+ else
111
+ commit("#{path(id)}/cancel")
112
+ end
105
113
  end
106
114
  raise_on_api_error :cancel
107
115
 
@@ -118,8 +126,12 @@ module PayPal::SDK::Subscriptions
118
126
  end
119
127
  raise_on_api_error :capture
120
128
 
121
- def suspend(note)
122
- commit("#{path(id)}/suspend", reason: note)
129
+ def suspend(note=nil)
130
+ if note
131
+ commit("#{path(id)}/suspend", reason: note)
132
+ else
133
+ commit("#{path(id)}/suspend")
134
+ end
123
135
  end
124
136
  raise_on_api_error :suspend
125
137
 
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module Subscriptions
4
- VERSION = "0.3.1"
4
+ VERSION = "0.4.0"
5
5
  end
6
6
  end
7
7
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_development_dependency('paypal-sdk-core')
25
+ spec.add_dependency 'paypal-sdk-rest-pmrb'
26
26
 
27
27
  spec.add_development_dependency "bundler", "~> 2.0"
28
28
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,23 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal-sdk-subscriptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piers Chambers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-12 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: paypal-sdk-core
14
+ name: paypal-sdk-rest-pmrb
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- type: :development
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
@@ -66,16 +66,16 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
- description:
69
+ description:
70
70
  email:
71
71
  - piers@varyonic.com
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".github/workflows/ci.yaml"
76
77
  - ".gitignore"
77
78
  - ".rspec"
78
- - ".travis.yml"
79
79
  - Gemfile
80
80
  - LICENSE.txt
81
81
  - README.md
@@ -99,7 +99,7 @@ homepage: https://github.com/varyonic/paypal-subscriptions-sdk-ruby
99
99
  licenses:
100
100
  - MIT
101
101
  metadata: {}
102
- post_install_message:
102
+ post_install_message:
103
103
  rdoc_options: []
104
104
  require_paths:
105
105
  - lib
@@ -114,9 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.7.10
119
- signing_key:
117
+ rubygems_version: 3.3.26
118
+ signing_key:
120
119
  specification_version: 4
121
120
  summary: Missing PayPal REST SDK for Subscriptions Management.
122
121
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6
7
- before_install: gem install bundler -v 2.0.1