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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17bc14848210eed34b62b45f9bb5ca2851fe42fd808443716fb954b13d87cf18
4
- data.tar.gz: 0fc5db01b5b4cc2d4f7061cf39e2fee8228ba4f2e14c53418ebd062a59a96a82
3
+ metadata.gz: '09c464a43ec6877eb5a39da4e42abf5f0cfe2e00f968a199cebd252ee17ec73d'
4
+ data.tar.gz: b0d9d976b00dc49916af0c103378ca745e299ca86cccd359c05e0378f1694f77
5
5
  SHA512:
6
- metadata.gz: e55cc8df6ace275789c36df33e509a393d49bfe9c72deeb4e4959e5837da03a336b4999248c268645c3ef7261e2edcb33850c1c89b0e50c98186d574d919c4a6
7
- data.tar.gz: 0a4068c669755c185f7fc8c23e4b6c99019a68b52340d2866861d3f954152cadf517b6ce06b157075b9bb061be446a6fdf63e513694109d3930efc8ed8db7345
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
@@ -7,6 +7,7 @@ Gemfile.lock
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /vendor/
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
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/
@@ -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
- 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
99
104
  end
100
105
  raise_on_api_error :activate
101
106
 
102
- def cancel
103
- 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
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
- 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
122
135
  end
123
136
  raise_on_api_error :suspend
124
137
 
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module Subscriptions
4
- VERSION = "0.3.0"
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.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: 2020-04-05 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