paypal-sdk-subscriptions 0.3.0 → 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 +4 -4
- data/.github/workflows/ci.yaml +29 -0
- data/.gitignore +1 -0
- data/README.md +3 -3
- data/lib/paypal-sdk/subscriptions/subscription.rb +19 -6
- data/lib/paypal-sdk/subscriptions/version.rb +1 -1
- data/paypal-sdk-subscriptions.gemspec +1 -1
- metadata +10 -11
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09c464a43ec6877eb5a39da4e42abf5f0cfe2e00f968a199cebd252ee17ec73d'
|
4
|
+
data.tar.gz: b0d9d976b00dc49916af0c103378ca745e299ca86cccd359c05e0378f1694f77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/.gitignore
CHANGED
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
|
-
[![
|
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
|
-
[
|
80
|
-
[
|
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/
|
@@ -33,6 +33,7 @@ module PayPal::SDK::Subscriptions
|
|
33
33
|
|
34
34
|
object_of :name, SubscriberName
|
35
35
|
object_of :email_address, String
|
36
|
+
object_of :payer_id, String
|
36
37
|
object_of :shipping_address, ShippingAddress
|
37
38
|
end
|
38
39
|
|
@@ -94,13 +95,21 @@ module PayPal::SDK::Subscriptions
|
|
94
95
|
object_of :create_time, DateTime
|
95
96
|
array_of :links, Link
|
96
97
|
|
97
|
-
def activate
|
98
|
-
|
98
|
+
def activate(note=nil)
|
99
|
+
if note
|
100
|
+
commit("#{path(id)}/activate", reason: note)
|
101
|
+
else
|
102
|
+
commit("#{path(id)}/activate")
|
103
|
+
end
|
99
104
|
end
|
100
105
|
raise_on_api_error :activate
|
101
106
|
|
102
|
-
def cancel
|
103
|
-
|
107
|
+
def cancel(note=nil)
|
108
|
+
if note
|
109
|
+
commit("#{path(id)}/cancel", reason: note)
|
110
|
+
else
|
111
|
+
commit("#{path(id)}/cancel")
|
112
|
+
end
|
104
113
|
end
|
105
114
|
raise_on_api_error :cancel
|
106
115
|
|
@@ -117,8 +126,12 @@ module PayPal::SDK::Subscriptions
|
|
117
126
|
end
|
118
127
|
raise_on_api_error :capture
|
119
128
|
|
120
|
-
def suspend(note)
|
121
|
-
|
129
|
+
def suspend(note=nil)
|
130
|
+
if note
|
131
|
+
commit("#{path(id)}/suspend", reason: note)
|
132
|
+
else
|
133
|
+
commit("#{path(id)}/suspend")
|
134
|
+
end
|
122
135
|
end
|
123
136
|
raise_on_api_error :suspend
|
124
137
|
|
@@ -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.
|
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.
|
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:
|
11
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: paypal-sdk-
|
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: :
|
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
|
-
|
118
|
-
|
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: []
|