lago-ruby-client 0.51.0.pre.beta → 0.52.2.pre.beta
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/lib/lago/api/connection.rb +1 -1
- data/lib/lago/api/resources/customer.rb +10 -0
- data/lib/lago/api/resources/gross_revenue.rb +17 -0
- data/lib/lago/api/resources/invoice_collection.rb +17 -0
- data/lib/lago/api/resources/invoiced_usage.rb +17 -0
- data/lib/lago/api/resources/mrr.rb +17 -0
- data/lib/lago/api/resources/organization.rb +1 -0
- data/lib/lago/version.rb +1 -1
- data/lib/lago-ruby-client.rb +4 -0
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ae6bbe19cdae52cc8ec1e9e6c146ff8190c317adc1801c5d130a192678ebff5
|
4
|
+
data.tar.gz: cdc030eee49b3adeb895783f561cfd434ffa91b6edebcaf5bccbc741209e0e83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2638ab5b7f59540ac33a32cd412fea0065f174894e92840fa5daca7ca55ce53409ef4e19a2648afbdae1edd7685bd38af0820c21c164183fd991b46a6067f876
|
7
|
+
data.tar.gz: 0cdbeb94a04aaf18f6f71a5c49f96ac25782be816979ea11051dffae4a16d5ea94d2ca2ee74e815d774652e7a62f24a32a4b9eefb31a3b32748689e0473684de
|
data/lib/lago/api/connection.rb
CHANGED
@@ -34,7 +34,7 @@ module Lago
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def get(path = uri.path, identifier:)
|
37
|
-
uri_path = identifier.nil? ? path : "#{path}/#{identifier}"
|
37
|
+
uri_path = identifier.nil? ? path : "#{path}/#{URI.encode_www_form_component(identifier)}"
|
38
38
|
response = http_client.send_request(
|
39
39
|
'GET',
|
40
40
|
uri_path,
|
@@ -41,6 +41,16 @@ module Lago
|
|
41
41
|
JSON.parse(response.to_json, object_class: OpenStruct).portal_url
|
42
42
|
end
|
43
43
|
|
44
|
+
def checkout_url(external_customer_id)
|
45
|
+
uri = URI(
|
46
|
+
"#{client.base_api_url}#{api_resource}/#{external_customer_id}/checkout_url",
|
47
|
+
)
|
48
|
+
|
49
|
+
response = connection.post(uri, identifier: nil)[root_name]
|
50
|
+
|
51
|
+
JSON.parse(response.to_json, object_class: OpenStruct).checkout_url
|
52
|
+
end
|
53
|
+
|
44
54
|
def whitelist_params(params)
|
45
55
|
result_hash = {
|
46
56
|
external_id: params[:external_id],
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lago
|
4
|
+
module Api
|
5
|
+
module Resources
|
6
|
+
class InvoiceCollection < Base
|
7
|
+
def api_resource
|
8
|
+
'analytics/invoice_collection'
|
9
|
+
end
|
10
|
+
|
11
|
+
def root_name
|
12
|
+
'invoice_collection'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -17,6 +17,7 @@ module Lago
|
|
17
17
|
webhook_url: params[:webhook_url],
|
18
18
|
webhook_urls: params[:webhook_urls],
|
19
19
|
country: params[:country],
|
20
|
+
default_currency: params[:default_currency],
|
20
21
|
address_line1: params[:address_line1],
|
21
22
|
address_line2: params[:address_line2],
|
22
23
|
state: params[:state],
|
data/lib/lago/version.rb
CHANGED
data/lib/lago-ruby-client.rb
CHANGED
@@ -20,8 +20,12 @@ require 'lago/api/resources/credit_note'
|
|
20
20
|
require 'lago/api/resources/customer'
|
21
21
|
require 'lago/api/resources/event'
|
22
22
|
require 'lago/api/resources/fee'
|
23
|
+
require 'lago/api/resources/gross_revenue'
|
23
24
|
require 'lago/api/resources/group'
|
24
25
|
require 'lago/api/resources/invoice'
|
26
|
+
require 'lago/api/resources/invoice_collection'
|
27
|
+
require 'lago/api/resources/invoiced_usage'
|
28
|
+
require 'lago/api/resources/mrr'
|
25
29
|
require 'lago/api/resources/organization'
|
26
30
|
require 'lago/api/resources/plan'
|
27
31
|
require 'lago/api/resources/subscription'
|
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.52.2.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-
|
11
|
+
date: 2023-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -142,8 +142,12 @@ files:
|
|
142
142
|
- lib/lago/api/resources/customer.rb
|
143
143
|
- lib/lago/api/resources/event.rb
|
144
144
|
- lib/lago/api/resources/fee.rb
|
145
|
+
- lib/lago/api/resources/gross_revenue.rb
|
145
146
|
- lib/lago/api/resources/group.rb
|
146
147
|
- lib/lago/api/resources/invoice.rb
|
148
|
+
- lib/lago/api/resources/invoice_collection.rb
|
149
|
+
- lib/lago/api/resources/invoiced_usage.rb
|
150
|
+
- lib/lago/api/resources/mrr.rb
|
147
151
|
- lib/lago/api/resources/organization.rb
|
148
152
|
- lib/lago/api/resources/plan.rb
|
149
153
|
- lib/lago/api/resources/subscription.rb
|
@@ -175,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
179
|
- !ruby/object:Gem::Version
|
176
180
|
version: 1.3.1
|
177
181
|
requirements: []
|
178
|
-
rubygems_version: 3.3.
|
182
|
+
rubygems_version: 3.0.3.1
|
179
183
|
signing_key:
|
180
184
|
specification_version: 4
|
181
185
|
summary: Lago Rest API client
|