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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d29bab2cc198f4a6f157226dc74aecd5004253267126616c2f474b2e900377ca
4
- data.tar.gz: 610847cc06d3bc542c33d8417b9c32721adee4b89a13afd1e78c376ada42212b
3
+ metadata.gz: 53274a9f3c8b5ee161c0b57df19501ad5b2ef921a04029e220a7cecb4311753a
4
+ data.tar.gz: 38f71e3f30abc7527a10670a9e38a5899da6e1689c9b7be3ba676017b454d806
5
5
  SHA512:
6
- metadata.gz: 188e53b50fe7ecb07f9d2cca75a44f1b3532ff5c4577f13ce29b12582ef083cc40442398a8d918b7fd3be73d7034feec26138a60c94a8d58a15f1536abb2d016
7
- data.tar.gz: a20504bc60b6e43986e7502685eb8568b7d9858e8bbb4dcfdb862246b92b3d5e6f6241b9c1e0575d15ee182a7957c5657f812a08c11054c4a19b68d5455face7
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.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.9.3)
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paddle
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  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.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-16 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday