lemonsqueezy 1.0.0 → 1.0.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/lemon_squeezy/models/subscription.rb +4 -2
- data/lib/lemon_squeezy/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: 53f2c6ca5274eba19d0bff2b7d05b439f4ffaad8fe2061537d35eafea9930337
|
4
|
+
data.tar.gz: 0d41faa2caed4e7f142a64df9196ff3c28f66d17f773108329d5876d2d299b85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8c0b303b09b54fb089eb5bc6d4dbe62fc162dc9bc6052860fc4f0b5ec61eb82cbb9fc9ba8c3e566e7251583a60ebeb52b6579fd366facf938745c74c3981555
|
7
|
+
data.tar.gz: '016958edb001b1e7b42c67280184a14cbfd29e455fd15fb0586766f3b8cfd8d52330c940f2d0e4551dd88ea23a32b6bdb96ad87a86b12b39e6ef00d5ec724e22'
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -159,7 +159,8 @@ LemonSqueezy::Subscription.cancel id: 123
|
|
159
159
|
LemonSqueezy::Subscription.uncancel id: 123
|
160
160
|
|
161
161
|
# Change the Plan for a Subscription
|
162
|
-
|
162
|
+
# invoice_immediately and disable_prorations are optional and false by default.
|
163
|
+
LemonSqueezy::Subscription.change_plan id: 123, plan_id: 111, variant_id: 111, invoice_immediately: false, disable_prorations: false
|
163
164
|
```
|
164
165
|
|
165
166
|
### Subscription Invoices
|
@@ -77,14 +77,16 @@ module LemonSqueezy
|
|
77
77
|
Subscription.new(response.body["data"]) if response.success?
|
78
78
|
end
|
79
79
|
|
80
|
-
def change_plan(id:, plan_id:, variant_id:)
|
80
|
+
def change_plan(id:, plan_id:, variant_id:, invoice_immediately: false, disable_prorations: false)
|
81
81
|
body = {
|
82
82
|
data: {
|
83
83
|
type: "subscriptions",
|
84
84
|
id: id.to_s,
|
85
85
|
attributes: {
|
86
86
|
product_id: plan_id,
|
87
|
-
variant_id: variant_id
|
87
|
+
variant_id: variant_id,
|
88
|
+
invoice_immediately: invoice_immediately,
|
89
|
+
disable_prorations: disable_prorations
|
88
90
|
}
|
89
91
|
}
|
90
92
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lemonsqueezy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|