lago-ruby-client 0.36.0.pre.beta → 0.41.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/client.rb +4 -0
- data/lib/lago/api/connection.rb +4 -2
- data/lib/lago/api/resources/base.rb +2 -2
- 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 +0 -1
- data/lib/lago/api/resources/organization.rb +1 -1
- data/lib/lago/api/resources/webhook_endpoint.rb +25 -0
- data/lib/lago/version.rb +1 -1
- data/lib/lago-ruby-client.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d8ccee9b5d5b546c3f3767de3302d289f36fcc7b24b8bd675354a2bfcb11085
|
4
|
+
data.tar.gz: d85d5769dd5066e09a5e843611f44bf715a94675fefb422411508e73879dccc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f44bf8202addef8f3388e0a76192d7a0f4e1bac6b0c59812ad7bf52be66207dc5f43a954cdff63d0447d45d417d0fa3da11e1e9fd998533a166722fa0d4d702
|
7
|
+
data.tar.gz: 8f1704781da4667851ab36fd6f9f76602fbcacd9c54f62ee6b5388fb3d15c05e2d849c75f32f1e76efc32dbcd994d02888558d0e5ee8f6a7c45a7717616b24ec
|
data/lib/lago/api/client.rb
CHANGED
data/lib/lago/api/connection.rb
CHANGED
@@ -45,8 +45,10 @@ module Lago
|
|
45
45
|
handle_response(response)
|
46
46
|
end
|
47
47
|
|
48
|
-
def destroy(path = uri.path, identifier:)
|
49
|
-
uri_path =
|
48
|
+
def destroy(path = uri.path, identifier:, options: nil)
|
49
|
+
uri_path = path
|
50
|
+
uri_path += "/#{identifier}" if identifier
|
51
|
+
uri_path += "?#{URI.encode_www_form(options)}" unless options.nil?
|
50
52
|
response = http_client.send_request(
|
51
53
|
'DELETE',
|
52
54
|
uri_path,
|
@@ -42,8 +42,8 @@ module Lago
|
|
42
42
|
JSON.parse(response.to_json, object_class: OpenStruct)
|
43
43
|
end
|
44
44
|
|
45
|
-
def destroy(identifier)
|
46
|
-
response = connection.destroy(identifier: identifier)[root_name]
|
45
|
+
def destroy(identifier, options: nil)
|
46
|
+
response = connection.destroy(identifier: identifier, options: options)[root_name]
|
47
47
|
|
48
48
|
JSON.parse(response.to_json, object_class: OpenStruct)
|
49
49
|
end
|
@@ -15,6 +15,7 @@ module Lago
|
|
15
15
|
def whitelist_params(params)
|
16
16
|
result_hash = {
|
17
17
|
webhook_url: params[:webhook_url],
|
18
|
+
webhook_urls: params[:webhook_urls],
|
18
19
|
country: params[:country],
|
19
20
|
address_line1: params[:address_line1],
|
20
21
|
address_line2: params[:address_line2],
|
@@ -40,7 +41,6 @@ module Lago
|
|
40
41
|
(billing_params || {}).slice(
|
41
42
|
:invoice_footer,
|
42
43
|
:invoice_grace_period,
|
43
|
-
:vat_rate,
|
44
44
|
:document_locale,
|
45
45
|
)
|
46
46
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lago
|
4
|
+
module Api
|
5
|
+
module Resources
|
6
|
+
class WebhookEndpoint < Base
|
7
|
+
def api_resource
|
8
|
+
'webhook_endpoints'
|
9
|
+
end
|
10
|
+
|
11
|
+
def root_name
|
12
|
+
'webhook_endpoint'
|
13
|
+
end
|
14
|
+
|
15
|
+
def whitelist_params(params)
|
16
|
+
{
|
17
|
+
root_name => {
|
18
|
+
webhook_url: params[:webhook_url],
|
19
|
+
}.compact,
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
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: 0.
|
4
|
+
version: 0.41.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-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lib/lago/api/resources/wallet.rb
|
154
154
|
- lib/lago/api/resources/wallet_transaction.rb
|
155
155
|
- lib/lago/api/resources/webhook.rb
|
156
|
+
- lib/lago/api/resources/webhook_endpoint.rb
|
156
157
|
- lib/lago/version.rb
|
157
158
|
homepage: https://github.com/getlago/lago-ruby-client
|
158
159
|
licenses:
|