lago-ruby-client 1.1.0 → 1.3.0
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/resources/billable_metric.rb +1 -0
- data/lib/lago/api/resources/invoice.rb +7 -0
- data/lib/lago/api/resources/plan.rb +2 -1
- data/lib/lago/api/resources/wallet.rb +1 -1
- data/lib/lago/api/resources/wallet_transaction.rb +2 -1
- 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: db9100b72418369e5619896f01ef8075881047bdc18dcf664f1deaabff1febcb
|
4
|
+
data.tar.gz: b96aa70520b76aa5fea75894e1e72e357c385eca7b0bdc526193d5bc998d59d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08ffbe2eb2aec60f3f6c00d9af57d5340c39e0c88eee12dba5065b76d3a0636ab295ede1597a24fe9a013b57105855e15e729701e14def665c9ee2d570b52a9c'
|
7
|
+
data.tar.gz: dea0ad70155fbec7437f8c1b7c8313cf5f0bacc6381cf0887a6d3e384610941e99a75bde27e62ddc1a8e0e43e5ebabf16239ed481d0ae90f797f7205c83ebcd0
|
@@ -42,6 +42,13 @@ module Lago
|
|
42
42
|
JSON.parse(response.to_json, object_class: OpenStruct).invoice
|
43
43
|
end
|
44
44
|
|
45
|
+
def lose_dispute(invoice_id)
|
46
|
+
path = "/api/v1/invoices/#{invoice_id}/lose_dispute"
|
47
|
+
response = connection.put(path, identifier: nil, body: {})
|
48
|
+
|
49
|
+
JSON.parse(response.to_json, object_class: OpenStruct).invoice
|
50
|
+
end
|
51
|
+
|
45
52
|
def retry_payment(invoice_id)
|
46
53
|
path = "/api/v1/invoices/#{invoice_id}/retry_payment"
|
47
54
|
response = connection.post({}, path)
|
@@ -39,7 +39,7 @@ module Lago
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def whitelist_minimum_commitment(minimum_commitment)
|
42
|
-
minimum_commitment
|
42
|
+
minimum_commitment&.slice(
|
43
43
|
:amount_cents,
|
44
44
|
:invoice_display_name,
|
45
45
|
:tax_codes,
|
@@ -60,6 +60,7 @@ module Lago
|
|
60
60
|
:min_amount_cents,
|
61
61
|
:properties,
|
62
62
|
:group_properties,
|
63
|
+
:filters,
|
63
64
|
:tax_codes,
|
64
65
|
)
|
65
66
|
|
@@ -24,7 +24,8 @@ module Lago
|
|
24
24
|
'wallet_transaction' => {
|
25
25
|
wallet_id: params[:wallet_id],
|
26
26
|
paid_credits: params[:paid_credits],
|
27
|
-
granted_credits: params[:granted_credits]
|
27
|
+
granted_credits: params[:granted_credits],
|
28
|
+
voided_credits: params[:voided_credits]
|
28
29
|
}.compact
|
29
30
|
}
|
30
31
|
end
|
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: 1.
|
4
|
+
version: 1.3.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-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|