paddlerb 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/paddle/resources/users.rb +12 -0
- data/lib/paddle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53274a9f3c8b5ee161c0b57df19501ad5b2ef921a04029e220a7cecb4311753a
|
4
|
+
data.tar.gz: 38f71e3f30abc7527a10670a9e38a5899da6e1689c9b7be3ba676017b454d806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 925ea261490f4724558c5caef81fad0ef68a23389632f9a62bc437ff63e9071bea2ca6b7444471e4f36c3bf694084eaf4846fe2cfc57f22a5d07aef053c66047
|
7
|
+
data.tar.gz: c1904ba56c9f4bd7099d816c498dac9115db1c2fd7272344543c2925bc0491f2131217243f24172c2e0b5bdeb81d8782b2bdbfb3b5c24fa1fa4671711be76a5f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paddlerb (0.1.
|
4
|
+
paddlerb (0.1.2)
|
5
5
|
faraday (~> 1.7)
|
6
6
|
faraday_middleware (~> 1.1)
|
7
7
|
|
@@ -9,7 +9,7 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
dotenv (2.7.6)
|
12
|
-
faraday (1.
|
12
|
+
faraday (1.10.0)
|
13
13
|
faraday-em_http (~> 1.0)
|
14
14
|
faraday-em_synchrony (~> 1.0)
|
15
15
|
faraday-excon (~> 1.1)
|
@@ -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
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.2
|
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-02-
|
11
|
+
date: 2022-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|