lemonsqueezy 1.0.0 → 1.0.1

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: '0900634c79d4767c4035474bf0c842e8a08f4ae6a967d8111e2c20b0da65321d'
4
- data.tar.gz: 65fe9091c594652c165f771c72dd763b0496163eac3d2bc6d5fb6b26a2ed2d85
3
+ metadata.gz: 53f2c6ca5274eba19d0bff2b7d05b439f4ffaad8fe2061537d35eafea9930337
4
+ data.tar.gz: 0d41faa2caed4e7f142a64df9196ff3c28f66d17f773108329d5876d2d299b85
5
5
  SHA512:
6
- metadata.gz: 876df20f2d4528f04e0c1dbbde80043879c17dd45a209b4ad7f1ac8a099f50e77df5e4b16b198b3ab14247208df2b8e3eb64794d18f364c96ff6c399610b9223
7
- data.tar.gz: 78175a9305d0453b2bf755a516a2fbd8a308ca6f2976c946863f6d84d2bd8ebb9d2a36d5c3fb9130ac2551a290d32618def69365e53437635da51fe50d4a1c55
6
+ metadata.gz: a8c0b303b09b54fb089eb5bc6d4dbe62fc162dc9bc6052860fc4f0b5ec61eb82cbb9fc9ba8c3e566e7251583a60ebeb52b6579fd366facf938745c74c3981555
7
+ data.tar.gz: '016958edb001b1e7b42c67280184a14cbfd29e455fd15fb0586766f3b8cfd8d52330c940f2d0e4551dd88ea23a32b6bdb96ad87a86b12b39e6ef00d5ec724e22'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lemonsqueezy (1.0.0)
4
+ lemonsqueezy (1.0.1)
5
5
  faraday (~> 2.0)
6
6
 
7
7
  GEM
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
- LemonSqueezy::Subscription.change_plan id: 123, plan_id: 111, variant_id: 111
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
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LemonSqueezy
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
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.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-14 00:00:00.000000000 Z
11
+ date: 2024-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday