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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdf1388f4cfbc50e85bd922ceb5750a124523cba5cfd682bd8f4d5c12dfe468b
4
- data.tar.gz: cb665b1fa147abc1e1e139ae5fd509830744b04278ef7a299fa7479342bf6246
3
+ metadata.gz: 2d8ccee9b5d5b546c3f3767de3302d289f36fcc7b24b8bd675354a2bfcb11085
4
+ data.tar.gz: d85d5769dd5066e09a5e843611f44bf715a94675fefb422411508e73879dccc1
5
5
  SHA512:
6
- metadata.gz: 4a8ae503606672f763f6176072f03ea7756b8dcbac11b8935799af18329f57f0f440f1798de81ca224e4ca4c4ff13e148958adf1c6fd5efc7de4dc8828b3bcd2
7
- data.tar.gz: 82fcb7fa7531fece1c895913269f5bbf169754e1032b033879ac1b8d5ec59cfc472452e1bbb312aa0aa3276fb9841b280bc42244e28ac973372734e7436ba00e
6
+ metadata.gz: 0f44bf8202addef8f3388e0a76192d7a0f4e1bac6b0c59812ad7bf52be66207dc5f43a954cdff63d0447d45d417d0fa3da11e1e9fd998533a166722fa0d4d702
7
+ data.tar.gz: 8f1704781da4667851ab36fd6f9f76602fbcacd9c54f62ee6b5388fb3d15c05e2d849c75f32f1e76efc32dbcd994d02888558d0e5ee8f6a7c45a7717616b24ec
@@ -94,6 +94,10 @@ module Lago
94
94
  def webhooks
95
95
  Lago::Api::Resources::Webhook.new(self)
96
96
  end
97
+
98
+ def webhook_endpoints
99
+ Lago::Api::Resources::WebhookEndpoint.new(self)
100
+ end
97
101
  end
98
102
  end
99
103
  end
@@ -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 = "#{path}/#{identifier}"
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
@@ -18,6 +18,7 @@ module Lago
18
18
  name: params[:name],
19
19
  code: params[:code],
20
20
  description: params[:description],
21
+ recurring: params[:recurring],
21
22
  aggregation_type: params[:aggregation_type],
22
23
  field_name: params[:field_name],
23
24
  group: params[:group],
@@ -16,6 +16,7 @@ module Lago
16
16
  result_hash = {
17
17
  name: params[:name],
18
18
  code: params[:code],
19
+ description: params[:description],
19
20
  amount_cents: params[:amount_cents],
20
21
  amount_currency: params[:amount_currency],
21
22
  percentage_rate: params[:percentage_rate],
@@ -67,7 +67,6 @@ module Lago
67
67
  :provider_customer_id,
68
68
  :sync,
69
69
  :sync_with_provider,
70
- :vat_rate,
71
70
  :document_locale,
72
71
  )
73
72
  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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lago
4
- VERSION = '0.36.0-beta'
4
+ VERSION = '0.41.0-beta'
5
5
  end
@@ -31,3 +31,4 @@ require 'lago/api/resources/tax'
31
31
  require 'lago/api/resources/wallet'
32
32
  require 'lago/api/resources/wallet_transaction'
33
33
  require 'lago/api/resources/webhook'
34
+ require 'lago/api/resources/webhook_endpoint'
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.36.0.pre.beta
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-06-08 00:00:00.000000000 Z
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: