lago-ruby-client 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lago/api/resources/plan.rb +21 -0
- data/lib/lago/version.rb +1 -1
- data/lib/lago-ruby-client.rb +1 -0
- 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: b7d714be8c838702df1fa8cfe4a8ab87cfebf2dfc8b6cecb3f92409293f2d579
|
4
|
+
data.tar.gz: 611ad0fe3b6e3978090c0d84d20b54d93d7cbcfcf1dfbd315988e4590b2d6e05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50b62e58757101cd210e4117dfdb64a707184baa2e17faafe9eb45b753197cd8d21f78c0e0beb59d4a0d57b4221dfd64462591de0da46bc58addf908bdd1cad0
|
7
|
+
data.tar.gz: 51ca6572c5a9cffa9080a813d5921e2d7e2eb5b1ade7fded76a5256e082b0333a3f3a4be4bde23268bc972a761b0c7680bd4e15da541c8536d4e60d11700ea38
|
@@ -35,6 +35,10 @@ module Lago
|
|
35
35
|
result_hash[:minimum_commitment] = minimum_commitment
|
36
36
|
end
|
37
37
|
|
38
|
+
whitelist_usage_thresholds(params[:usage_thresholds]).tap do |usage_thresholds|
|
39
|
+
result_hash[:usage_thresholds] = usage_thresholds unless usage_thresholds.empty?
|
40
|
+
end
|
41
|
+
|
38
42
|
{ root_name => result_hash }
|
39
43
|
end
|
40
44
|
|
@@ -69,6 +73,23 @@ module Lago
|
|
69
73
|
|
70
74
|
processed_charges
|
71
75
|
end
|
76
|
+
|
77
|
+
def whitelist_usage_thresholds(usage_thresholds)
|
78
|
+
processed_usage_thresholds = []
|
79
|
+
|
80
|
+
usage_thresholds&.each do |c|
|
81
|
+
result = (c || {}).slice(
|
82
|
+
:id,
|
83
|
+
:threshold_display_name,
|
84
|
+
:amount_cents,
|
85
|
+
:recurring,
|
86
|
+
)
|
87
|
+
|
88
|
+
processed_usage_thresholds << result unless result.empty?
|
89
|
+
end
|
90
|
+
|
91
|
+
processed_usage_thresholds
|
92
|
+
end
|
72
93
|
end
|
73
94
|
end
|
74
95
|
end
|
data/lib/lago/version.rb
CHANGED
data/lib/lago-ruby-client.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lago-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lovro Colic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|