lago-ruby-client 0.48.0.pre.beta → 0.49.0.pre.beta
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/add_on.rb +1 -0
- data/lib/lago/api/resources/customer.rb +14 -2
- data/lib/lago/api/resources/invoice.rb +8 -1
- data/lib/lago/api/resources/plan.rb +2 -0
- data/lib/lago/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: 072a79f8acff2afd5899ae8ff2780ec1eba4fc769b3799ee8b465ee5c1941265
|
4
|
+
data.tar.gz: 296248f68d455e649dd05b79e6d4092b44d7c1aacf2f37870617348f5a366542
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60a9a6bd1bc167e54db965d0feccba55a8f4f57e4ce19da8f55708ba7dd27a3257144329e90f340376e0456998117a6a8ce82811b719e6878bb7c645a1873cd6
|
7
|
+
data.tar.gz: 9490fc69ee57f8293f2cf7ca7608bed779b2bbc1444e6a0d3dcafba7d35618eab26868f140608a9c65bac6ffa207f589a474e8d6423059b6140582595957086b
|
@@ -14,14 +14,26 @@ module Lago
|
|
14
14
|
|
15
15
|
def current_usage(external_customer_id, external_subscription_id)
|
16
16
|
uri = URI(
|
17
|
-
"#{client.base_api_url}#{api_resource}/#{external_customer_id}
|
17
|
+
"#{client.base_api_url}#{api_resource}/#{external_customer_id}" \
|
18
|
+
"/current_usage?external_subscription_id=#{external_subscription_id}",
|
18
19
|
)
|
19
20
|
connection.get(uri, identifier: nil)
|
20
21
|
end
|
21
22
|
|
23
|
+
def past_usage(external_customer_id, external_subscription_id, options = {})
|
24
|
+
uri = URI(
|
25
|
+
"#{client.base_api_url}#{api_resource}/#{external_customer_id}/past_usage",
|
26
|
+
)
|
27
|
+
|
28
|
+
connection.get_all(
|
29
|
+
options.merge(external_subscription_id: external_subscription_id),
|
30
|
+
uri,
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
22
34
|
def portal_url(external_customer_id)
|
23
35
|
uri = URI(
|
24
|
-
"#{client.base_api_url}#{api_resource}/#{external_customer_id}/portal_url"
|
36
|
+
"#{client.base_api_url}#{api_resource}/#{external_customer_id}/portal_url",
|
25
37
|
)
|
26
38
|
|
27
39
|
response = connection.get(uri, identifier: nil)[root_name]
|
@@ -90,7 +90,14 @@ module Lago
|
|
90
90
|
processed_fees = []
|
91
91
|
|
92
92
|
fees.each do |f|
|
93
|
-
result = (f || {}).slice(
|
93
|
+
result = (f || {}).slice(
|
94
|
+
:add_on_code,
|
95
|
+
:unit_amount_cents,
|
96
|
+
:units,
|
97
|
+
:description,
|
98
|
+
:tax_codes,
|
99
|
+
:invoice_display_name,
|
100
|
+
)
|
94
101
|
|
95
102
|
processed_fees << result unless result.empty?
|
96
103
|
end
|
@@ -15,6 +15,7 @@ module Lago
|
|
15
15
|
def whitelist_params(params)
|
16
16
|
result_hash = {
|
17
17
|
name: params[:name],
|
18
|
+
invoice_display_name: params[:invoice_display_name],
|
18
19
|
code: params[:code],
|
19
20
|
interval: params[:interval],
|
20
21
|
description: params[:description],
|
@@ -43,6 +44,7 @@ module Lago
|
|
43
44
|
:charge_model,
|
44
45
|
:pay_in_advance,
|
45
46
|
:invoiceable,
|
47
|
+
:invoice_display_name,
|
46
48
|
:min_amount_cents,
|
47
49
|
:properties,
|
48
50
|
:group_properties,
|
data/lib/lago/version.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: 0.
|
4
|
+
version: 0.49.0.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lovro Colic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|