lago-ruby-client 0.47.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/billable_metric.rb +1 -0
- data/lib/lago/api/resources/coupon.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/api/resources/subscription.rb +1 -0
- data/lib/lago/version.rb +1 -1
- metadata +7 -7
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
|
@@ -26,6 +26,7 @@ module Lago
|
|
26
26
|
frequency_duration: params[:frequency_duration],
|
27
27
|
expiration: params[:expiration],
|
28
28
|
expiration_at: params[:expiration_at],
|
29
|
+
terminated_at: params[:terminated_at],
|
29
30
|
}.compact
|
30
31
|
|
31
32
|
whitelist_limitations(params[:applies_to]).tap do |limitations|
|
@@ -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
|
-
autorequire:
|
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
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description:
|
125
|
+
description:
|
126
126
|
email:
|
127
127
|
- lovro@getlago.com
|
128
128
|
executables: []
|
@@ -160,7 +160,7 @@ metadata:
|
|
160
160
|
homepage_uri: https://www.getlago.com/
|
161
161
|
source_code_uri: https://github.com/getlago/lago-ruby-client
|
162
162
|
documentation_uri: https://doc.getlago.com
|
163
|
-
post_install_message:
|
163
|
+
post_install_message:
|
164
164
|
rdoc_options: []
|
165
165
|
require_paths:
|
166
166
|
- lib
|
@@ -175,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: 1.3.1
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
179
|
-
signing_key:
|
178
|
+
rubygems_version: 3.3.3
|
179
|
+
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Lago Rest API client
|
182
182
|
test_files: []
|