paddlerb 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -30
- data/lib/paddle/client.rb +0 -1
- data/lib/paddle/resources/users.rb +12 -0
- data/lib/paddle/version.rb +1 -1
- data/lib/paddle.rb +0 -1
- data/paddlerb.gemspec +1 -2
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3345bfa15fce5cb913aed28b11b063e63762cb1642e845b14ea460ba17dde0a
|
4
|
+
data.tar.gz: b3d0805971f5fb4333e16be6f7a1cfa8ca6eb756c4b51e8eaf85bd295b080839
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19691761339e8b0b19927fc16bc3028466b7cadd15307915892c904cf2fd72b15f08f7e4d31717ef0932444665fc64a074e42be04b1b7d4abe87a3a542dc8bd
|
7
|
+
data.tar.gz: 998be2a5fa670889a71849bf1accd1f8e7d0bebab0553ad5e9a31b4373b95527312eb43419e6387b7c9c729f9de17928fd68b034c6ba889c8b88e82cb229ffca
|
data/Gemfile.lock
CHANGED
@@ -1,41 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paddlerb (0.1.
|
5
|
-
faraday (~>
|
6
|
-
faraday_middleware (~> 1.1)
|
4
|
+
paddlerb (0.1.4)
|
5
|
+
faraday (~> 2.0)
|
7
6
|
|
8
7
|
GEM
|
9
8
|
remote: https://rubygems.org/
|
10
9
|
specs:
|
11
10
|
dotenv (2.7.6)
|
12
|
-
faraday (
|
13
|
-
faraday-
|
14
|
-
faraday-em_synchrony (~> 1.0)
|
15
|
-
faraday-excon (~> 1.1)
|
16
|
-
faraday-httpclient (~> 1.0)
|
17
|
-
faraday-multipart (~> 1.0)
|
18
|
-
faraday-net_http (~> 1.0)
|
19
|
-
faraday-net_http_persistent (~> 1.0)
|
20
|
-
faraday-patron (~> 1.0)
|
21
|
-
faraday-rack (~> 1.0)
|
22
|
-
faraday-retry (~> 1.0)
|
11
|
+
faraday (2.2.0)
|
12
|
+
faraday-net_http (~> 2.0)
|
23
13
|
ruby2_keywords (>= 0.0.4)
|
24
|
-
faraday-
|
25
|
-
|
26
|
-
faraday-excon (1.1.0)
|
27
|
-
faraday-httpclient (1.0.1)
|
28
|
-
faraday-multipart (1.0.3)
|
29
|
-
multipart-post (>= 1.2, < 3)
|
30
|
-
faraday-net_http (1.0.1)
|
31
|
-
faraday-net_http_persistent (1.2.0)
|
32
|
-
faraday-patron (1.0.0)
|
33
|
-
faraday-rack (1.0.0)
|
34
|
-
faraday-retry (1.0.3)
|
35
|
-
faraday_middleware (1.2.0)
|
36
|
-
faraday (~> 1.0)
|
37
|
-
minitest (5.14.4)
|
38
|
-
multipart-post (2.1.1)
|
14
|
+
faraday-net_http (2.0.2)
|
15
|
+
minitest (5.15.0)
|
39
16
|
rake (13.0.6)
|
40
17
|
ruby2_keywords (0.0.5)
|
41
18
|
|
@@ -49,4 +26,4 @@ DEPENDENCIES
|
|
49
26
|
rake (~> 13.0)
|
50
27
|
|
51
28
|
BUNDLED WITH
|
52
|
-
2.3.
|
29
|
+
2.3.6
|
data/lib/paddle/client.rb
CHANGED
@@ -12,6 +12,18 @@ module Paddle
|
|
12
12
|
User.new(response.body["response"]) if response.success?
|
13
13
|
end
|
14
14
|
|
15
|
+
def pause(subscription_id:, **params)
|
16
|
+
attrs = {subscription_id: subscription_id, pause: true}
|
17
|
+
response = post_request("2.0/subscription/users/update", body: attrs.merge(params))
|
18
|
+
User.new(response.body["response"]) if response.success?
|
19
|
+
end
|
20
|
+
|
21
|
+
def unpause(subscription_id:, **params)
|
22
|
+
attrs = {subscription_id: subscription_id, pause: false}
|
23
|
+
response = post_request("2.0/subscription/users/update", body: attrs.merge(params))
|
24
|
+
User.new(response.body["response"]) if response.success?
|
25
|
+
end
|
26
|
+
|
15
27
|
def update_postcode(subscription_id:, postcode:)
|
16
28
|
attrs = {subscription_id: subscription_id, postcode: postcode}
|
17
29
|
response = post_request("2.0/subscription/users/postcode", body: attrs)
|
data/lib/paddle/version.rb
CHANGED
data/lib/paddle.rb
CHANGED
data/paddlerb.gemspec
CHANGED
@@ -28,6 +28,5 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency "faraday", "~>
|
32
|
-
spec.add_dependency "faraday_middleware", "~> 1.1"
|
31
|
+
spec.add_dependency "faraday", "~> 2.0"
|
33
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paddlerb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,28 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: faraday_middleware
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.1'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.1'
|
26
|
+
version: '2.0'
|
41
27
|
description:
|
42
28
|
email:
|
43
29
|
- dean@deanpcmad.com
|
@@ -104,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
90
|
- !ruby/object:Gem::Version
|
105
91
|
version: '0'
|
106
92
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.1.6
|
108
94
|
signing_key:
|
109
95
|
specification_version: 4
|
110
96
|
summary: Ruby library for interacting with the Paddle API
|