paddle 2.1.1 → 2.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 +5 -3
- data/README.md +13 -0
- data/lib/paddle/models/credit_balance.rb +4 -0
- data/lib/paddle/models/customer.rb +5 -0
- data/lib/paddle/models/subscription.rb +5 -0
- data/lib/paddle/version.rb +1 -1
- data/lib/paddle.rb +2 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c5311f039c9752abbee3441651b3ce883a7510dd623adda0ad072ca2af5d1d8
|
4
|
+
data.tar.gz: baecbf364ccc785580d3773825065d7b53538f0f7f3961417e6f27714abc1809
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366a5b93b873a672c301053766561e1df38198dcdbd19f6db6545c59e68b40f12c2717a0250e373286ba298e95d0baef5fa74784634666c9667590b7c9c7ecfb
|
7
|
+
data.tar.gz: b321361bd7ad221c3f2eab2a05c9a7db79cae069bd4963bac647f92b34a25c81b68998a2436870eae6aa26acddf50644b3c8791209aa9372e35b2d567b9183f4
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paddle (2.1.
|
4
|
+
paddle (2.1.2)
|
5
5
|
faraday (~> 2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
+
base64 (0.1.1)
|
10
11
|
dotenv (2.7.6)
|
11
|
-
faraday (2.7.
|
12
|
+
faraday (2.7.11)
|
13
|
+
base64
|
12
14
|
faraday-net_http (>= 2.0, < 3.1)
|
13
15
|
ruby2_keywords (>= 0.0.4)
|
14
16
|
faraday-net_http (3.0.2)
|
@@ -28,4 +30,4 @@ DEPENDENCIES
|
|
28
30
|
vcr
|
29
31
|
|
30
32
|
BUNDLED WITH
|
31
|
-
2.
|
33
|
+
2.4.21
|
data/README.md
CHANGED
@@ -130,6 +130,10 @@ Paddle::Customer.retrieve(id: "ctm_abc123")
|
|
130
130
|
# Update a customer
|
131
131
|
# https://developer.paddle.com/api-reference/customers/update-customer
|
132
132
|
Paddle::Customer.update(id: "ctm_abc123", status: "archived")
|
133
|
+
|
134
|
+
# Retrieve credit balance for a customer
|
135
|
+
# https://developer.paddle.com/api-reference/customers/list-credit-balances
|
136
|
+
Paddle::Customer.credit(id: "ctm_abc123")
|
133
137
|
```
|
134
138
|
|
135
139
|
### Addresses
|
@@ -214,6 +218,8 @@ Paddle::Subscription.list(customer_id: "ctm_abc123")
|
|
214
218
|
Paddle::Subscription.list(price_id: "pri_abc123")
|
215
219
|
Paddle::Subscription.list(status: "active")
|
216
220
|
Paddle::Subscription.list(status: "canceled")
|
221
|
+
Paddle::Subscription.list(collection_mode: "automatic")
|
222
|
+
Paddle::Subscription.list(scheduled_change_action: "cancel")
|
217
223
|
|
218
224
|
# Retrieve a subscription
|
219
225
|
Paddle::Subscription.retrieve(id: "sub_abc123")
|
@@ -242,14 +248,21 @@ Paddle::Subscription.charge(id: "sub_abc123", items: [ { price_id: "pri_123abc",
|
|
242
248
|
# https://developer.paddle.com/api-reference/subscriptions/pause-subscription
|
243
249
|
Paddle::Subscription.pause(id: "sub_abc123")
|
244
250
|
Paddle::Subscription.pause(id: "sub_abc123", effective_from: "next_billing_period")
|
251
|
+
Paddle::Subscription.pause(id: "sub_abc123", effective_from: "immediately")
|
245
252
|
|
246
253
|
# Resume a paused subscription
|
247
254
|
# https://developer.paddle.com/api-reference/subscriptions/resume-subscription
|
248
255
|
Paddle::Subscription.resume(id: "sub_abc123", effective_from: "next_billing_period")
|
256
|
+
Paddle::Subscription.resume(id: "sub_abc123", effective_from: "immediately")
|
249
257
|
|
250
258
|
# Cancel a subscription
|
251
259
|
# https://developer.paddle.com/api-reference/subscriptions/cancel-subscription
|
252
260
|
Paddle::Subscription.cancel(id: "sub_abc123", effective_from: "next_billing_period")
|
261
|
+
Paddle::Subscription.cancel(id: "sub_abc123", effective_from: "immediately")
|
262
|
+
|
263
|
+
# Activate a trialing subscription
|
264
|
+
# https://developer.paddle.com/api-reference/subscriptions/activate-subscription
|
265
|
+
Paddle::Subscription.activate(id: "sub_abc123")
|
253
266
|
```
|
254
267
|
|
255
268
|
### Adjustments
|
data/lib/paddle/version.rb
CHANGED
data/lib/paddle.rb
CHANGED
@@ -39,7 +39,9 @@ module Paddle
|
|
39
39
|
autoload :Event, "paddle/models/event"
|
40
40
|
autoload :NotificationSetting, "paddle/models/notification_setting"
|
41
41
|
autoload :Notification, "paddle/models/notification"
|
42
|
+
|
42
43
|
autoload :NotificationLog, "paddle/models/notification_log"
|
44
|
+
autoload :CreditBalance, "paddle/models/credit_balance"
|
43
45
|
|
44
46
|
# Load Classic APIs
|
45
47
|
module Classic
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
-
description:
|
27
|
+
description:
|
28
28
|
email:
|
29
29
|
- dean@deanpcmad.com
|
30
30
|
executables: []
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/paddle/models/address.rb
|
73
73
|
- lib/paddle/models/adjustment.rb
|
74
74
|
- lib/paddle/models/business.rb
|
75
|
+
- lib/paddle/models/credit_balance.rb
|
75
76
|
- lib/paddle/models/customer.rb
|
76
77
|
- lib/paddle/models/discount.rb
|
77
78
|
- lib/paddle/models/event.rb
|
@@ -92,7 +93,7 @@ licenses: []
|
|
92
93
|
metadata:
|
93
94
|
homepage_uri: https://github.com/deanpcmad/paddle
|
94
95
|
source_code_uri: https://github.com/deanpcmad/paddle
|
95
|
-
post_install_message:
|
96
|
+
post_install_message:
|
96
97
|
rdoc_options: []
|
97
98
|
require_paths:
|
98
99
|
- lib
|
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
111
|
rubygems_version: 3.4.10
|
111
|
-
signing_key:
|
112
|
+
signing_key:
|
112
113
|
specification_version: 4
|
113
114
|
summary: Ruby library for the Paddle Billing & Classic APIs
|
114
115
|
test_files: []
|